This is the Script.
var numberOfJumps : float;
var jumpForce : float =3;
function Update()
{
if(Input.GetButtonUp("Jump")){
rigidbody.AddForce(Vector3.up * jumpForce * 100);
numberOfJumps += 1;}
**if (numberOfJumps == 2){
yield WaitForSeconds(4);
numberOfJumps = 0;}**
}
Once I added the second if statement, there are no errors or warnings, but the script just wont work, cant even jump. while running the game I get “Script Error: Update() can not be a coroutine”. thanks a lot.