Bullet Bug

Every time the bullet hits the player by accident input features stop working. For example the player can’t go up or down the ladder freely using the arrow keys, or the player can’t buy ammo by pressing the “e” key.

void OnCollisionEnter2D(Collision2D coll)
    {
        var hit = coll.gameObject;
		var hitplayer = hit.transform.tag = "Enemy";
        if (hitplayer != null)
        {
            var Zomhealth = hit.GetComponent<ZombieHealth>();
            Debug.Log("hit");
            Zomhealth.ZomDamage(damage);
            Destroy(gameObject);
        }
    }

Fixed it b/c of this website Ignore Collision Using Layer and Tag Concept in Unity