help: how to DON'T drag the object for "var other : Transform;" in to inspector

In unity script manual there is this script:

var other : Transform;

if (other) {

var dist = Vector3.Distance(other.position, transform.position);

print ("Distance to other: " + dist);

}

now, how to don’t drag the object for “var other : Transform;” in to inspector but indicate it only with the script?

I have tried:

var other : Transform = GameObject.Find("First Person Controller");



if (other) {

var dist = Vector3.Distance(other.position, transform.position);

print ("Distance to other: " + dist);

}

but

“Cannot convert UnityEgine.GameObjiect to UnityEngine.Transdorm”

Sorry for the noob question :frowning:

var other : Transform = GameObject.Find(“First Person Controller”).transform;

Don’t work. New Error:

“ArgumentException: Find can only be called from the main thread”

var other : Transform;

function Awake() {
    other = GameObject.Find("First Person Controller").transform;
}

Thank you!
It work fine now!