Making objects with the same tag destroy eachother

So for my game I have robots that use a rock-paper-scissors system, where each is better against and weak against each other. So far it’s mostly working so far, but I’m having trouble with what happens when two robots with the same tag collided.

Here’s the code for one of my robots that tells it how to reacted to the others.

private void OnTriggerEnter(Collider other)
    {
        if (other.tag == ("Smasher"))
        {

            Object.Destroy(this.gameObject);
        }
   
        if (other.tag == ("Gouger"))
        {
            Debug.Log("awake");
            Object.Destroy(this.gameObject);
        }

        if (other.tag == ("Wall"))
        {
            Debug.Log("awake");
            Object.Destroy(this.gameObject);
        }

    }

So far, the collisions with the Gouger and the wall work. But when it collides with another smasher, they just push each other around instead of destroying themselves.

Basically what I’m asking is how can I make two objects that have the same tag destroy each other upon collision?

You must have something else going on: I took just that function, set up two objects with your tag, and it works perfectly to destroy both.

Put a debug.log( this.name + " > " + other.tag ) into the first line of your OnTrigger, before any of the if statements. Make sure each object has a unique name.

I bet you do not see 2 debug log statements - one for each object colliding - which will mean your objects are not set up the way you expect.