On June 16th 2019 the Minecraft Forum will be archived. Click here to learn more.
Im trying to make a non griefing zone and the commands are correctly written but it doesnt work.
/gamemode adventure @a[gamemode=survival,distance=20] (r)
this is for players to be in adventure mode when they are in a 20 block distance
/gamemode survival @a[gamemode=adventure,distance=20] (rm)
and this is for players when they leave the 20 block radius to turn into survival
What version of Minecraft are you using? Are the command blocks set to repeat and also set to always active?
When you use " distance=20 ", it ONLY exactly 20 blocks away. Instead, try using " distance=20.. " (distance of 20 or more blocks) or " distance=..20 " (distance of up to 20 blocks)
1.13.2 i've tried to set it to repeat and always active, but it isnt working
Craftbros answer was valid. Use his solution.