Accessing a component...

Hi. I am trying to access another object’s component (a script that has the name “spawn”).

function Start(){
	var player : MonoScript;
	player = GameObject.Find("Player").GetComponent(Spawn);
}

But when I try, I get this error
“Cannot convert ‘Spawn’ to ‘UnityEditor.MonoScript’.”. What is wrong? Thanks.

Don’t declare the player variable as a MonoScript.
Declare it as Spawn.

function Start(){
    var player : Spawn;
    player = GameObject.Find("Player").GetComponent(Spawn);
}

C#

void Start(){
	Spawn player = null;
	player = GameObject.Find("Player").GetComponent<Spawn>();
}