Hi. I am having trouble with a script. I am trying to make an object disappear when the object itself enters a trigger. Here's the script I have below.

var object : GameObject;
var sound : AudioClip;

function OnTriggerEnter(Target:Collider)
{
	if(Target.tag == "LurkerEnd")
	{
		Destroy(object);
		audio.PlayClipAtPoint(sound, transform.position);
	}
}

If I understand correctly, change line 8 to:

 Destroy(Target.gameObject);

If it does work, put a Debug.Log() just inside your OnTriggerEnter(). That will tell you if you have an issue getting the trigger to work, or if you have a tag issue. And you don’t need ‘object’ after this change.