scrip t

{// Update is called once per frame void Update() { } private void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag == “Enemy 2”) { Destroy(col.gameObject); }
if (col.gameObject.tag == “Enemy 3”) { Destroy(col.gameObject); } if (col.gameObject.tag == “Enemy 4”) { Destroy(col.gameObject); } } } trying to make a script where only some enemies can destroy some players what am I doing wrong

First of all, you are not Using code tags properly

You have written code that doesn’t do exactly what you want.

Someone might be able to give you a more specific answer if you provide more information.

figured it out