How to make a zone the player can't walk through but enemies can

Look into collision profiles. You need to set the player’s collision profile to something different from the enemy profiles, and then set the box collision to ignore enemies but block the player.