I Need A Cooldown Effect For The Space Button
So The Player Cant Press it For 2 Seconds After
if (Input.GetKey("space"))
{
GetComponent<Rigidbody>().AddForce(new Vector3(0, 1, 0), ForceMode.VelocityChange);
}
else {
GetComponent<Rigidbody>().AddForce(new Vector3(0, -1, 0), ForceMode.VelocityChange);
}
}
}
When I Press Space I Can Hold The Button And Fly!