Hi i was trying to make ti so that the humanoids jump is disabled for 12 seconds then you can jump again please help?
1 | repeat wait() until plr.Character |
2 |
3 | local chr = plr.Character |
4 |
5 | chr:WaitForChild( "Humanoid" ).Changed:connect( function () |
6 | chr.Humanoid.Jump = false |
7 | end ) |
Make the event a variable, and disconnect it after the given amount of time. Try studying this example:
01 | repeat wait() until plr.Character |
02 | local chr = plr.Character |
03 |
04 | local event = chr:WaitForChild( "Humanoid" ).Changed:connect( function () |
05 | chr.Humanoid.Jump = false |
06 | end ) |
07 |
08 | wait( 12 ) |
09 |
10 | event:disconnect() |