Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to prevent jumping when on a ride till the end of a ride?

Asked by 9 years ago

I am trying to build a rollar coaster and I saw that if people jump during the ride it will break. I was wondering if someone could help make it when the ride start the person in the seat can't jump till it go back to start at full stop. Thanks if could help.

1 answer

Log in to vote
0
Answered by 9 years ago

Use the changed event and see if the jump turns true, if it does, change it to false.

script.Parent.Humanoid.Changed:connect(function(jump) --If the humanoid changed
    if jump == "Jump" then --If the humanoid's jump turned true/false then
        script.Parent.Humanoid.Jump = false --Don't jump
    end
end)

You need to clone this script into the character from SERVERSTORAGE, ServerStorage because scripts don't run inside of server storage.


Hope it helps

Ad

Answer this question