I’m trying to make an object collectible. The object is a coin with a tag “Coin”. I have script in player that goes as follows:
public class Collection : MonoBehaviour {
void OnTriggerEnter(Collider other)
{
if (other.tag == "Coin")
{
Destroy(other.gameObject);
}
}
}
Player has a collider and the object has a collider with “is trigger” ticked. It doesn’t remove the object when they interact. What am I missing here?