I’ve searched the entire web to find a solution for this. I’m using a C# script and I can’t get a jump delay. Here’s the jump part of my script :
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
if (CanJump == true)
{
if (CanJump == true)
{
if (CanJump == true)
{
CanJump = false;
rigbody.AddForce(new Vector3(0, 5, 0), ForceMode.Impulse);
Invoke("resetIsJumping", 3);
}
}
}
}
void resetIsJumping()
{
CanJump = true;
}
}