transform.LookAt is not looking, and not displaying errors?

Hi all. I am using this code to make on of my AI look at a random waypoint.


var waypoint : Transform[];

function update() {
	transform.LookAt(waypoint[Random.Range(0, waypoint.Length)]);
}

However, it is not working. When I apply it to a cube, the cube just sits there without turning, and it doesn’t give me any errors. I am not sure what could be causing this. Any help would be greatly appreciated. Thanks in advance!

The function you should write is Update not update.