car moving sideways

when i try out the car i just added a script to it only moves sideways for some reason,
i have copy and pasted the code below.

var forwardSpeed : float = 3;
var turnSpeed: float = 2;

function Update () 
{
  //this is the forward speed that will actually happen
  var forwardMoveAmount = Input.GetAxis("Vertical")*forwardSpeed;
  
  //actual turn amount
  var turnAmount = Input.GetAxis("Horizontal")*turnSpeed;
  
  //rotate the vehicle
  transform.Rotate(0,turnAmount,0);
  
  //push the vehicle forward with a force
  	rigidbody.AddRelativeForce(-forwardMoveAmount,0,0);
}

The line AddRelativeForce(-forwardMoveAmount,0,0) reads inputs as the x/y/z push force. So it’s currently pushing your car along negative X. Nothing wrong with that, and if your car is facing that way, it will go forwards. Just figure out which way your car is really facing (look at the model, whichever arrow is aimed out the front) and push that way.

Unity officially thinks that +Z is forward (the blue arrow.) So might be easier later if you aim the car that way and push on (0,0,forwardMoveAmt).