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

How to prevent characters from jumping?

Asked by 8 years ago

Simple question. How would you disable jumping for the standard ROBLOX character? I understand that a while ago there was a method where you could use this:

while true do
    plr.Character.Humanoid.Jump = false
    wait()
end

To stop characters from jumping. However, this doesn't work any more.

0
Did you make sure to actually give plr the property of all players? Scootakip 299 — 8y
0
I was using that as an example. legospacepolice 60 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

This is what you'd do:

repeat wait(0)until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid")and game.Players.LocalPlayer:GetMouse()
game.Players.LocalPlayer.Character.Humanoid.Changed:connect(function(jumpy) 
if jumpy == "Jump"then 
game.Players.LocalPlayer.Character.Humanoid.Jump = false 
end 
end) 
0
Thank you very Much legospacepolice 60 — 8y
Ad

Answer this question