Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Disabling jump and wait 12 seconds then you can jump?

Hi i was trying to make ti so that the humanoids jump is disabled for 12 seconds then you can jump again please help?

 repeat wait() until plr.Character

local chr = plr.Character

chr:WaitForChild("Humanoid").Changed:connect(function()
    chr.Humanoid.Jump = false
end)

1 answer

✓ Accepted answer

Make the event a variable, and disconnect it after the given amount of time. Try studying this example:

 repeat wait() until plr.Character
local chr = plr.Character

local event = chr:WaitForChild("Humanoid").Changed:connect(function()
    chr.Humanoid.Jump = false
end)

wait(12)

event:disconnect()

This discussion is preserved as it was. New answers, comments, and votes are closed.