UserInputService.JumpRequest fires rapidly

UserInputService.JumpRequest fires rapidly when you hold spacebar.

Hold spacebar and see what happens

Expected behavior: Jump Request should only fire as often as the character jumps


This bug broke a communiy fly script, breaking my game as well. We were getting a lot of angry players and losing a lot of players at the same time.

We fixed our game’s Flight script by changing our code to detect when the Player presses Spacebar with InputBegan instead of JumpRequest, but any game that is still using JumpRequest is broken.

16 Likes

The wiki does state that the JumpRequest event will be fired multiple times per single jump. The behavior that I would expect, and would find much more useful, is to have the JumpRequest event fire a single time for a single jump.

1 Like

I confirmed with an older FiB build of Studio that this didn’t used to happen, so it is indeed a bug.

5 Likes

I’m not sure if internally this was marked as fixed, but this issue still happens if you hold space bar while resetting.

  1. Reset
  2. Hold the space bar
  3. Character spawns
  4. You can let go of the space bar now
  5. JumpRequest now fires rapidly like in the OP
1 Like

Nothing has changed it still fires rapidly even if you just tap the Spacebar

https://gyazo.com/ca317d219faeb0a2f20a2f00f69bb8a7

Repro.rbxl (17.4 KB)

Oddly enough it works fine for me aside from when i do the death + hold space bar thing. I had assumed it was fixed, but missed my unique edge case.

This is still an issue for me. It happens on both desktop and the mobile emulator with iPhone 7. If I click the jump button for 1 frame, it seems to only print once. But for some reason it prints 3-4 times if I click it normally. It prints 1 or 2 extra times if you click the button once to jump up and then again when you’re off the ground (as seen at the end of the video).

It seems like this bug still happens in some form, jump request will often fire twice for one space bar press and randomly fire while holding space down. These traits make this event pretty annoying to use as it doesn’t really correspond with a user’s requests to jump. One press input should really be one request. Even official wiki tutorials treat the event as if it should function like this. The double jump tutorial script will often just make you double jump with one space press. Documentation - Roblox Creator Hub

12 Likes

And yet the bug still happens, Very upsetting because i can’t find another way to bind an action to the player’s mobile jump button and the spacebar at the same time, Would be great if we’d get an official solution for this problem…

Has Humanoid.Jumped proved to be an alternate solution? Does it have a similar problem?

1 Like

I think I have found a solution to this (if this is not already solved)

The Humanoid.Jumping function has a parameter that is returned, which is something called IsActive. You can check if this bool is true, then performing your script there.

1 Like

And yet we still come back to this bug, when will this be fixed … It’s causing user frustration as users cannot predict the outcome of their jump requests as code is oftentimes ran twice for the same request.

I’ve managed to play around with this constraint a little with a denounce of me keeping track of their last request but alas no luck as some users still report frustration with this.

4 Likes

I agree, Roblox REALLY needs to fix this issue. Even though this was documented on the API, it would help a lot if this were easier to work with.

I hate having to write tons of bad code just to accommodate for this tiny factor that’s causing so many problems, please fix this!

6 Likes

Bumping this. This has been an issue for so long that it’s beginning to be a bit unacceptable.

9 Likes

This is still an issue as far as I’m concerned?? Can we please get this fixed?

1 Like

It is absurd we still didn’t get some transparency regarding why this happens…

Adding a debounce to your code should serve as a simple fix, not sure why there’s complaining about this. (assuming the debounce works)

Debounce doesn’t solve my problem.


I have to resort to something like this to wait the request spam out

The API says it’ll fire multiple times, maybe it not firing was a bug?

Since this event fires multiple times for a single jump request, using a debounce is suggested.

Source

1 Like

I really hope Roblox changes this behavior; it would make life much easier. In the mean time, here is a script that detects if the player jumped:

local function Jumped()
	if jumpDebounce == true then return end
	jumpDebounce = true
	print("Jumped")
	wait()
	jumpDebounce = false
end

Humanoid.Jumping:Connect(Jumped)