I followed this video to get a system to allow players to fly in survival mode:
I modified the system by giving it a "toggle item' that allows the player to disable flying whenever they find it annoying or otherwise unwanted.
Sometimes whenever I use the toggle item the barrier block gets removed and the player falls to the ground as intended, but other times the barrier block remains and stays in the air, which means there's floating invisble blocks in midair, which is incredibly unwanted.
I'd prefer to just delete all barrier blocks within 10 blocks of the player whenever they stop flying, so I'd like you clever folks to help me.
How do I delete ALL Barrier blocks within 10 blocks of the player with command blocks?