How to make an object destroyed

Hello,
I have been trying to make the objec,t that enters the object with this script, destroyed but only that object. This is my code that I have so far, but when I run the game this function doesn’t work. nothing happenes.

function OnTriggerEnter (other : Collider) 
{
	if (other.gameObject.CompareTag ("Enemy1")) 
	{
		Destroy (GameObject.FindWithTag("Enemy1"));
	}
}

thanks.

function OnTriggerEnter (other : Collider) 

{

    if (other.gameObject.tag == "Enemy1") 

    {

        Destroy (other.gameObject);

    }

}
function OnTriggerEnter (other : Collider) 

{

    if (other.gameObject.CompareTag ("Enemy1")) 

    {

        Destroy (other.gameObject);

    }

}

Thanks,
But the objects still aren’t being destroyed. Is it a problem if the object with the code is spawned inside of the object to be destroyed?

just check weather the colliding object has collision detection is right .or use Debug.log ,method to detect the collision or not

I addeed the debug code in the if statement but it does not trigger the if statement.

  if (other.gameObject.CompareTag == "Enemy1")
     
        {
     Debug.Log("Destroy! (enemy)");
            Destroy (other.gameObject);
     
        }[\CODE]