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

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

Asked by 10 years ago

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

2 answers

Log in to vote
2
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
10 years ago
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.

Ad
Log in to vote
-1
Answered by 10 years ago
local humanoid = script.Parent:findFirstChild("Humanoid")

humanoid.Changed:connect(function(prop)
if prop == "Jump" then
prop=false
end
end)
1
Setting the variable to false won't set the property to false. 1waffle1 2908 — 10y

Answer this question