Not sure what is wrong with the script, JumpRequest is being fired sometimes more than once.
01 | CanDoubleJump = false |
02 | LastJumpTick = tick() |
03 |
04 | game:GetService( "UserInputService" ).JumpRequest:Connect( function () |
05 | if CanDoubleJump = = false then |
06 | CanDoubleJump = true |
07 | elseif CanDoubleJump then |
08 | if tick() - LastJumpTick < = 0.5 then |
09 | print ( "DOUBLE JUMPED!" ) |
10 | end |
11 |
12 | CanDoubleJump = false |
13 | end |
14 |
15 | LastJumpTick = tick() |
16 | end ) |