You would make a variable called whatever you like, make it a numeric one.
Set it to value: 0
Have the var load at start up of the game this way
your game knows that the var is there and ready to use.
once the player moves to the blocked room without cutting away the
barrier, then the IF statement in the blocked room will check to see if
your var is equal to 1, if It's still equal to 0 it'll send the player quickly
back to the other room, because the if statement will say what room to
send player to if your var is 0.
But now in your barrier code, once the barrier is completely destroyed
then set your var to 1, use another if statement if you have to.
once the barrier is destroyed the player can then move to the other room
because your var is now equal to 1.
I Know it seems a bit confusing, first time I've tried to explain exactly
what to do from simple text.
Sorry, but if you need anything else I'll try to answer, Goodluck