How can i disable jumping?

How can I deactivate jumping? I’ve tried this before: character.Humanoid.JumpPower = 0, when I do:print (character.Humanoid.JumpPower)The output returns 0 as it should. But for some reason I can still jump.

3 Likes

Try changing it on the explorer instead to see the problem?

1 Like

You dont have to do this specifically by a script, you can disable jump ability for players by clicking StarterPlayer in explorer, scroll down in properties and youll see CharacterJumpHeight 7.2 (Number of how high can you jump). If you put it to 0, you wont be able to use jump power at all. Hope this helped :slightly_smiling_face:

1 Like

There is also a check box(bool value) in humanoids as to whether someone can jump or not, not just setting it to zero. I think it is something like CanJump or CanUseJumpPower.

1 Like

Wouldn’t recommend simply changing the humanoid jump power, exploiters could bypass this by simply changing the number back (or so I’ve heard anyway).

I usually prefer eitheir unbinding jumping from the spacebar using ContextActionService or by disabling the jump state using HumanoidStateType.

Unbinding jump action (local script)

-- Game services
local ContextActionService = game:GetService("ContextActionService")
ContextActionService:UnbindAction("jumpAction")

Disabling jumping state (local script)

local player = game.Players.LocalPlayer
repeat wait() until player.Character
local Humanoid = player.Character:WaitForChild("Humanoid")

Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
16 Likes

How would you rebind the jump action though?

local ContextActionService = game:GetService("ContextActionService")
ContextActionService:BindAction("jumpAction")
1 Like