Vector3.lerp doesn't work

Hi Everyone,

I’m just starting to learn Unity and I don’t understand why this code doesn’t work. i would create a cube and move it. The code run correctly but my cube doesn’t move.

Thank you for your help

Julien

My code:

var cube;
var end : Transform;

function Start () {
	cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
	//cube.AddComponent(Rigidbody);
	cube.transform.position = Vector3 (0, 0, 0);
	end.transform.position = Vector3 (10, 0, 0);
}


function Update () {
	cube.transform.position = Vector3.Lerp(transform.position, end.position, Time.deltaTime);
}

Thank you all for your help, I’ve solved my problem.

var cube;
var end : Vector3;

function Start () {
	cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
	//cube.AddComponent(Rigidbody);
	cube.transform.position = Vector3 (0, -10, 0);
	end = Vector3(0, 0, 0);
}


function Update () {
	cube.transform.position = Vector3.Lerp(cube.transform.position, end, Time.time/10);
	//cube.transform.Translate(Time.deltaTime, 0, 0, Camera.main.transform);
}