How can i make the script only run when the player is falling?

  1. What do you want to achieve? I want the script attached to run only when the player is falling

  2. What is the issue? the script can still run when the player hasnt started losing altitude yet

  3. What solutions have you tried so far? Nothing yet, I’m completely stumped

Basically the script runs when the player presses q and it boosts them up in the air but only if the humanoid state is “freefalling”. but that state is activated while you still gain altitude, causing the script to not work properly if the player times it right.

Alongside with checking the HumanoidState, you may also implement a moving-direction logic (so, if the character’s HumanoidState is to Freefall and its moving direction is not up, run code).
You may check this post for further advice:

Hope this helps.

1 Like

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