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.
Try changing it on the explorer instead to see the problem?
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
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.
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)
How would you rebind the jump action though?
local ContextActionService = game:GetService("ContextActionService")
ContextActionService:BindAction("jumpAction")