Collision script not working (C#)

Hi Guys,

I have a collision script that works if a my coin collides with my object then the coid is destroyed. however my script isnt woking i have a respawn tag and a 2d collider on my object and i have a 2D rigidbody on my coin and a 2d collider and still its not working.

Thank You

Script

using UnityEngine;
using System.Collections;

public class StopsTheCoin : MonoBehaviour {

void OnCollisionEnter2D(Collision2D coll) {
	if (coll.gameObject.tag == "Respawn")
		Destroy (gameObject);
	
}

}

Dude, you need to make sure that it is a ‘Box collider 2D’ and that ‘Is Trigger’ it ticked, then change ‘OnCollisionEnter2D(Collision2D coll)’ to ‘OnTriggerEnter2D(Collider2D other)’