Before implement this code, please check if you add “Rigidbody” component to your objects and “Is Trigger” box is selected. Otherwise, it doesn’t work.
void OnTriggerEnter(Collider c) { if (c.collider.tag == "Enemy") { Destroy(c.gameObject); } }
void OnTriggerEnter(Collider c) { if (c.collider.tag == "Enemy") { Destroy(c.gameObject); } }