Movement Not Working

I have just installed the latest version of unity3d. This code should move the character in a very simple way, yet noting seems to happen. I had a friend test this code and it worked perfectly fine for him. There are no errors.

#pragma strict

	var hv = 0;
	var acc = 0.5;

function Start () {

}

function Update () {

	hv += Input.GetAxis("Horizontal") * acc;
	transform.position.x += hv;	

}

You have to use:

transform.position = new Vector3(transform.position.x + hv,transform.position.y,transform.position.z);

or:

transform.Translate(Vector3.right*hv);

Just like JoshsGames said.

But, this way you’re actually just teleporting the player. He’s probably gonna bug in the walls. Maybe consider using this?

rigidbody.velocity.x = Input.GetAxis("Horizontal") * acc;
//If you've got a 2D rigidbody then just change it
//from rigidbody.velocity.x
//to rigidbody2D.velocity.x

You don’t need the “hv” variable then and the code is even more simple.