I have this GameObject with the tag coin I am trying to destroy when the player collides with it using this code located in a player script attached to the player
public void OnCollisionEnter(Collision col){
var hit = col.gameObject;
if(hit.tag == "Coin"){
Destroy(hit.gameObject);
}
}
However upon collision nothing is happening