How do you make it so when you jump you can't jump again for a certain amount of time?

How do you make it so when you jump you can’t jump again for a certain amount of time? I didn’t know how to code jumping and gravity and all that so I watched a tutorial but it didn’t work. So how do I add all of that stuff?

If you mean how to jump only when on the ground, if you use the character controller component you can check [isGrounded][1] [1]: https://docs.unity3d.com/ScriptReference/CharacterController-isGrounded.html

1 Answer

1

First you check if a bool is true
For the jump you have to use rb.addforce(0,jumpPower,0);
Then you set the bool to false and Invoke a Method wich sets the bool back to true