Please make UserInputService.JumpRequest fire once at a time!

As a Roblox developer, it is currently too hard to detect double taps with jumping.

If Roblox is able to address this issue, it would improve my development experience because the wings in my game would work better. I have to put a small debounce on the function or else it’ll detect I tried to jump three times, which messes up the whole system of detecting fast double taps, so it glitches and if you jump up to a higher spot, it’ll make you fly sometimes.

4 Likes

I think you need to improve your code instead. JumpRequest is fired whenever the client requests to jump and it would be unexpected behaviour if you pass input attempting to jump and the signal does not fire. JumpRequest is for processing requests; use the Humanoid’s Jumping state if you need to check for when the Humanoid has actually jumped.

Double Jumping article has an example of how you can use JumpRequest to create a double jump though and performing those checks is necessary – not just debounces, but state checks as well – so you can respect the nature of the signal and avoid conflictions when trying to handle double jumps.

I would not like it at all if a signal’s behaviour was updated to perform in a manner that isn’t expected so I don’t see merit in this feature request.

8 Likes

I do not believe this is expected behavior, nor can I see the purpose of it firing multiple times per spacebar press. It would be far easier and more intuitive for it to only fire every time the spacebar/jump action button is pressed.

Source: UserInputService.JumpRequest fires rapidly - #5 by EchoReaper

That’s my mistake, the OP is non-specific about the current undesired behaviour, I did not know that it fires multiple times per passed jump input. I agree there then that it should fire only once every time that a jump is requested from the jumpAction binding.

Would be better for OP to have tacked on support for an existing feature request rather than make a new duplicate in that case.

2 Likes

Yeah, try it for yourself. Print inside of the function and it’ll run three times every jump.

I think it’s because it’s accounting for holding the spacebar down, as doing that also lets you jump as soon as you touch the ground. My reasoning for that is because it’s literally named “JumpRequest”, fire every time the player might want to jump, not when the spacebar is pressed and released.

1 Like

It doesn’t matter if you release the space bar or hold down the space bar, it prints 3 times! PLEASE, try it out in studio!!!

1 Like

Ok, so I tested it in Studio and found some other oddities as well;

  • Holding down the spacebar causes it to fire only when your character hits the ground, does this mean that it assumes the player has a humanoid character to fire these events?
  • Tapping the spacebar whilst falling fires it, holding spacebar down while falling does not fire it.
  • And yes, it fires 3 - 4 times, but only when pressing space from the ground. Each time it fires like this it’s a frame after the last time it fired, so you could have a debounce of (according to my testing) 4 frames.

My theory as to why it fires multiple times is that it’s firing every physics frame, which are at 240 Hz, exactly 4 physics frames per rendering frame.

1 Like

Yeah, that is definitely a messed up system. This should be a very easy system for Roblox to make.