Is there a way detect when JumpRequest ends?

Hey there! I’m trying to create a double jump script, and I want it to be compatible for all devices. I understand that using UserInputService.JumpRequest would be the best option for detecting jumps with full device compatibility, but I’ll need a debounce for this script as well. This is a problem, since there’s currently no InputEnded equivalent of JumpRequest (or ProcessedEvent parameter). I thought about detecting when the space bar and A button inputs are finished, but as far as I know, the only way to get the jump event for mobile players is through the request event, so I’m a bit unsure on how to properly implement a debounce for mobile.

PS: It should be noted that I’m not really looking for a debounce that just uses a wait, since that’ll allow the player to hold down the jump button, which isn’t what I’m looking for.

Any ideas? Thanks in advanced!

1 Like

just to clarify further - why are you looking for when the request ends, rather than when the player humanoid state has changed?

2 Likes

Try

humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
    if humanoid.Jump then return end
    -- code
end)
1 Like

I made a library for this problem, I recommend checking it out: JumpButton - Detect and buffer jump inputs accurately

A bonus of this is that a debounce isn’t needed. It only fires once per jump press, allowing the double jump to be much more responsive.

2 Likes

I should mention that I’ve never actually made a double jump script, so this is all guess work lol.
Using humanoid state’s definitely the better option, so I appreciate the advice ^^

This is sick man, I can’t believe I haven’t seen this lib before. Awesome work :fire:

Looks like that also fires over and over (I tested with a debounce)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.