Attacking
If walkers get too close, you will automatically switch to your melee weapon. However you will also lose some health. If you happen to get grabbed by two zombies at once, the game will end. Always reload when you have a chance and eliminate the walkers before they get too near.