How can solve these errors in my java script

#pragma strict

var rotationSpeed = 100;
var jumpHeight = 8;

private var isFalling = false;

function Update () 
{ 
       //Handle ball control
       var rotation : float = Input.GetAxis ("Horizontal") * rotationSpeed;
       rotation *= Time.deltaTime;
       rigidbody.AddRelativeTorque (Vector3.back * rotation);
       
       if (Input.GetKeyDown(KeyCode.W))
       (
         rigidbody.velocity.y =; jumpHeight;
       }
}

Please format your code properly - it's very hard to read in its current state.

When asking about errors, you should always include full error message. Properly formatting your code, would be a good idea as well - please spend a moment on watching the tutorial video (link on the right of the page). Btw - in your case, the problem is probably semicolon after = sign.

1 Answer

1

rigidbody.velocity.y =; jumpHeight;

Please do a few tutorials before you post such errors. “;” …