Help with Double Jump false triggering

look at keystrokes

Posted in scripting support forum
Not a single line of code
:confused:

3 Likes

oh yeah sorry here is the jump handler:

– // Jump Handler
UserInputService.JumpRequest:Connect(function()
if not character or not humanoid or not character:IsDescendantOf(workspace) or humanoid:GetState() == Enum.HumanoidStateType.Dead then
return
end

if acrobaticState.jumpDebounce or acrobaticState.isBonked then return end
acrobaticState.jumpDebounce = true
task.delay(0.1, function() acrobaticState.jumpDebounce = false end)

if acrobaticState.isGrounded then
	acrobaticState.canDoubleJump = true
	AcroModules.DoubleJump.PlayFirstSound()
	humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
	acrobaticState.lastJumpTime = os.clock()

elseif acrobaticState.isClimbing then
	acrobaticState.canDoubleJump = true
	AcroModules.DoubleJump.PlayFirstSound()
	humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
	acrobaticState.lastJumpTime = os.clock()

elseif acrobaticState.canDoubleJump and os.clock() - acrobaticState.lastJumpTime > 0.1 then
	if AcroModules.DoubleJump.PlaySecondSound() then
		playAnimation(doubleJumpAnim)
		rootPart.Velocity = Vector3.new(rootPart.Velocity.X, humanoid.JumpPower * 1.2, rootPart.Velocity.Z)
		acrobaticState.canDoubleJump = false

		if acrobaticState.isDiving then
			AcroModules.Dive.EndDive()
			acrobaticState.isDiving = false
			if acrobaticState.currentAnimations.DiveStart then
				acrobaticState.currentAnimations.DiveStart:Stop()
				acrobaticState.currentAnimations.DiveStart = nil
			end
		end
	end
end

end)