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

Is there a way to make a Player unable to jump?

Is there a way to make a Player unable to jump?

2 answers

local h=script.Parent:WaitForChild("Humanoid")
h.Changed:connect(function(p)
	if p=="Jump"then
		h[p]=false
	end
end)

Use the Changed event to set Humanoid.Jump to false instantly whenever the user presses space so the character doesn't respond to it.

local humanoid = script.Parent:findFirstChild("Humanoid")

humanoid.Changed:connect(function(prop)
if prop == "Jump" then
prop=false
end
end)

1 comment

1

Setting the variable to false won't set the property to false.

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