move script problem

here is my script i want my car to move towards the mouse so i have a mouse look script for that. I want it to move towards the mouse so i made a new script called mouse move, here’s what i have:

function Update () 
{		
  if (Input.GetMouseButtonDown(0))
    new Vector3(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y"), 0);
}

Hey Conflictbliz,

I am not quite sure what your problem is, but if you just want it to move forward when you push 0, I can help…

It will be something like this:

In C#:

 if(Input.GetKey("0"))
 transform.Translate(Vector3.forward * Time.deltaTime * 1);

In JavaScript:

if(Input.GetKey("0")) {
transform.Translate(Vector3.forward * Time.deltaTime * 1);
}

I hope you can get it working!

-Gibson