How do I destroy an object with script?

#pragma strict

function OnTriggerEnter (info : Collider)
{
	if (info.tag == "Oil")
	{
		Destroy(gameObject);
	}
}

This is my script for destroying a tree with water (tagged Oil). I have no idea why it is not working please help. I am new to unity so i am probably being stupid.

You have to reference the tree collider’s gameObject.

EDIT: Appended it to your original script.

#pragma strict
 
 
function OnTriggerEnter (info : Collider)
{
    if (info.tag == "Oil")
    {
       Destroy(info.gameObject);
    }
}