When the player comes in contact with the brick, he will have 3 seconds to climb the obstacle. If he doesn't make it in time, his player will sit down and fall. However, once he falls down he can get up and climb again. How can I make this so that the player sits down, then has to wait 5 seconds before getting up.
Also, another thing if possible make the script work once every 30 seconds because if the player moves inside the brick, it makes the script run 3 times instead of one and he keeps sitting over and over.
function OnTouched(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
print("3 SECONDS LEFT TO DO WARPED WALL")
wait(1)
print("2 SECONDS LEFT TO DO WARPED WALL")
wait(1)
print("1 SECONDS LEFT TO DO WARPED WALL")
wait(1)
print("You've failed!")
wait (0)
if (humanoid ~= nil) then
humanoid.Sit = true
end
end
script.Parent.Touched:connect(OnTouched)

1 comment
From what I know and have tried. You cannot force the human to not jump even if you remove the control module. The only way I know is... Put a sea at the player so that he sits in it and then make the Jump Power to 0. Works every time. ????