Not sure what is wrong with the script, JumpRequest is being fired sometimes more than once.

CanDoubleJump = false
LastJumpTick = tick()

game:GetService("UserInputService").JumpRequest:Connect(function()
	if CanDoubleJump == false then
		CanDoubleJump = true
	elseif CanDoubleJump then
		if tick() - LastJumpTick <= 0.5 then
			print("DOUBLE JUMPED!")
		end
		
		CanDoubleJump = false
	end
	
	LastJumpTick = tick()
end)

2 comments

0

i put this into a local script in StarterCharacterScripts and it works fine doesn't print twice

0

It works only when u press spacebar in intervals, if you hold spacebar it will print multiple times.