car move automatically script for mobile

in my game the car moving automatically and the player just moves left and right by moving his finger on touch screen. I need to correct my script…

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

function Update() {

var forwardMoveAmount = Input.GetAxis(“Vertical”)*forwardSpeed;

var turnAmount = Input.GetAxis(“Horizontal”)*turnSpeed;

transform.Rotate(0,turnAmount,0);

  • transform.Translate(Vector3.forward *Input.GetAxis(“Vertical”)Time.deltaTime30);
  • if(Input.GetKey(“escape”)){
  • Application.Quit();}

Um, you said your car moves forward automatically, but your code is performing look-ups on the vertical axis. Oh, and you’ll need Input.GetTouch() to get the mobile touch screen data.

firstly, thanks for your add.
but I need to know script you talking about really I need it to complete the Game actually I’m new in scripting and if you help me I’ll be thankful.