i have this script that when a bullet hits a destoryable tagged object it will destroy itself and the object it hits.
void OnCollisionEnter(Collider col)
{
if (col.gameObject.tag == "Destroyable")
{
Destroy(col.gameObject);
Destroy(this.gameObject);
}
}
the object im using to test is a sphere and has a rigidbody and sphere colider. the bullet is the same but smaller and with an “Ammo” tag.