Destroy Clone Game Object On Collision Doesn't work

Hey Guys,

I’m trying to make Block Breaker game. Now, I’m trying to create random power ups as a chance %5 when a block is destroyed.


This is where I instantiate a game object randomly.

public class BlockSquare : MonoBehaviour
{
[SerializeField] GameObject specPow;
 public GameObject spcPow;

public void SpecPowInstantiate()
    {
        int randomNum = UnityEngine.Random.Range(0,20 );
        if(randomNum == 10)
        {
            spcPow = Instantiate(specPow, transform.position, transform.rotation) as GameObject;
            Destroy(spcPow, 5f);
        }
        

    }



}

This is where I tried to destroy clone gameobjects. But I couldnt :

public class Paddle : MonoBehaviour
{
   BlockSquare blckSpecPow;

   private void OnTriggerEnter2D(Collider2D collision)
    {
        if(gameObject.tag == "SpecPowGameObject")
        {
            Destroy(blckSpecPow.spcPow);
        }

        
    }
}

I think the problem is in the second script, in the part where it says , because it should be like this cause this way it will search if the other objects tag is that and no the object tag of the script.
If that doesn’t work maybe the problem could be in the collider, rigidbidy or the Triggered option. But i think is the first thing.

I tried what you said. But that didn’t change anything. Thanks for your answer. Any other thoughts ?

Check that your tag is correct on your gameObject.