Hey, I’m trying to make it so when the enemy hits the player, the player’s gameObject will be destroyed
I currently have this:
void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag== "Enemy")
{
Destroy(gameObject);
}
}