OnTriggerEnter only Destroy other.gameObject.name "?"

Hello World.
I’m having trouble creating a simple JavaScript that would destroy only the object with a certain name on collision with an object with a trigger. I have already created a script that should be able to do this, but it doesn’t work. The console has no issues with my script, yet it doesn’t work. So this is where you come in! Now I figure that if you help me fix my script you will be helping countless others in this subject since this would be useful to others like you, like me. Here is the script noted I’m sorta a noob at programming.

function OnTriggerEnter (other : Collider) { if(other.gameObject.name == "It"){ Destroy(other.gameObject); } }

Please Help.

Sincerely, Steven

Here is the finished script it works!

function OnTriggerEnter (other:Collider){
	if(other.gameObject.name ==  "It"){
	Debug.Log("It went through");
	Destroy(gameObject.Find("It"));
	}
}

Steven, did you put a Debug.Log() in there to see if it actually ever gets into the “if” scope? I would print out the name in the debug and see what is coming back in the name variable.