Cannot remove a prefab using OnCollisionEnter function.

Hi, I have a set of spawners generating prefabs randomly and an object below that is supposed to remove the prefab when it collides with it.
This is the script Iam using:

   function OnCollisionEnter ( collision : Collision){
      if ( == "Coin(Clone)"){

Both objects have box colliders enabled, I’ve tried changing “is trigger”, changing the name of the object (coin, coin(Clone)), tried to change the script by adding transform variable and detecting collision with a prefab directly instead of the name but it is still not removing the prefabs. What am I missing?

Moving objects typically need to have a rigid body attached for collisions to occur. Check the collision matrix on Unity - Manual: Box Collider component reference to verify whether it is needed.

And I suggest using tags to identify objects in this manner.