I’m having a really hard time trying to figure out when the player tries to jump.
My first instinct is to listen for changes to Humanoid.Jump, but unfortunately this property seems to change 6 times every time you jump.
This means I need to look for another way. For PC I can just listen for the spacebar, but for cross-platform I have to search for a convenient interface. The first one I find is the Enum.PlayerActions.CharacterJump
input for ContextActionService
, but apparently this is wrong and doesn’t work on every platform, or it used to and it got replaced for some reason.
The next thing I find is UserInputService.JumpRequest
, and I’m back to the same problem as before; it fires 3 times every time I jump. The wiki recommends a debounce but it doesn’t recommend a certain length, and I would prefer when a player wants to do a double jump that it is perfectly responsive.
I think figuring out when the player inputs a jump action shouldn’t be this hard.