Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you prevent jumping?

I know for a fact that there is a way to prevent jumping, but I can't figure it out. I have tried BodyObjects, Changed events, and other methods, but I'm stumped. All help is appreciated!

1 answer

✓ Accepted answer

How I usually do it is by the Changed event and it worked for me.

Humanoid = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")

Humanoid.Changed:connect(function ()
	Humanoid.Jump = false
end

4 comments

0

I have tried this before, but it only works on Play Solo. I need something that works on a server.

1

you might want to add a line or 2 that waits for the character

0

This was just an example code, so I will only code what's given from the question. Yes, you might want to consider to have the script to pause its thread until the character is fully rendered.

1

Such as 'repeat wait() until game.Players.LocalPlayer' or some other such variations.

This discussion is preserved as it was. New answers, comments, and votes are closed.