Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I detect a local player jumping and increase their jumpheight by 1 each time they do?

Asked by
yayachik1 -11
2 years ago

How can I detect a local player jumping and each time they jump increase their jump height by +1?

1 answer

Log in to vote
1
Answered by 2 years ago
Edited 2 years ago

Use UserInputService.JumpRequest event. Make sure Humanoid.UseJumpPower is set to false.

local UserInputService = game:GetService("UserInputService")
local JumpHeight = 7.2 -- default is 7.2

UserInputService.JumpRequest:Connect(function()
    print("Player has jumped!")
    JumpHeight += 1 -- increases the height
end)
Ad

Answer this question