Im trying to make a room accessible to certain people. I made a deathCount objective named Deaths. Now what I want is this: If a player has 0 deaths and is within 4 blocks of the doorway[20,107,298,20,108,298] then it fills up with air. If the player does not have 0 deaths and is within 4 blocks then it fills with iron bars.
I have classes set up to give the player 1 point to Deaths so no player with a class may enter the Class Selection room until the reset the class which i have commands set up for that as well.