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

Why doesn't my Jump Prevention script work?

Asked by 8 years ago

This is my script, aimed to prevent your character from being able to jump. It is in workspace.

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

2 answers

Log in to vote
1
Answered by
XAXA 1569 Moderation Voter
8 years ago

That won't work. Jump will immediately be set to false after jumping anyway (look at the property window of the humanoid and jump, you'll see.)

Have you tried setting JumpPower to 0?

Ad
Log in to vote
-4
Answered by 8 years ago

you put == instead of = on line 3

1
Um bro. Its suppose to have that on line three. When using conditional statements you use == or =~ or =< and stuff. Conmmander 479 — 8y

Answer this question