GameObject.transform.name

Hi guys, why does this not work:

var target : GameObject;

function Start(){

transform.LookAt(GameObject.Find(target.transform.name));

}

Comes with error: no appropriate version of ‘UnityEngine.Transform.LookAt’ for the argument list ‘(UnityEngine.GameObject)’ was found. I thought transform.name would return a string ?

P.S Did try searching but to no avail.

LookAt() needs a transform to look at:

transform.LookAt(target.transform);