The “Start” method is only called once, when the object is about to be shown the first time. If you want to check for keyboard input, you want to have the check inside an “Update” method instead.
Also what you did would only put you at a exact position, you would need to use += so it adds your vector to the current position. It will also be a good idea to multiply that by Time. deltaTime as well so the movment is smooth and not effected by the frame rate.
#pragma strict
var Player : GameObject;
Player = GameObject.Find("Car");
function Start () {
}
function Update () {
if (Input.GetKey(KeyCode.RightArrow))
{
Player.transform.Translate(0.5,0,0);
};
if (Input.GetKey(KeyCode.LeftArrow))
{
Player.transform.Translate(-0.5,0,0);
};
if (Input.GetKey(KeyCode.UpArrow))
{
Player.transform.Translate(0,0,0.5);
};
if (Input.GetKey(KeyCode.DownArrow))
{
Player.transform.Translate(0,0,-0.5);
};
}