#How do I disable jumping?

1 messages · Page 1 of 1 (latest)

slim bloom
#

I have a stun module, but don't know which way disable jumping for plr. ``` -- stun handling

local StunModule = {}

function StunModule.Stun(char, duration)
local hum = char:FindFirstChild("Humanoid")
if not hum then return end

hum:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
hum:SetAttribute("CanMove", false)
print("Player is stunned")


local oldWalk = hum.WalkSpeed
hum.WalkSpeed = 0

task.delay(duration or 2, function()
if hum then
hum.WalkSpeed = oldWalk
hum:SetAttribute("CanMove", true)
hum:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
print("Player can move again")
end
end)
end

return StunModule ```

gritty lark
#

hum.JumpHieght could be 0

half needle
stuck scarab
#

hum.JumpPower could be 0

steep mural
#

You cant setstate enabled on server. SetStateEnabled has to be called by the client

steep mural
half needle
#

can't exploiters just set their own state then?

steep mural
#

Or change their character in any way