Minecraft – How to spread players that are in a certain area

minecraft-bedrock-editionminecraft-commands

I am making a server where I want to spread the players in the lobby A to Area A without it affecting the players in Lobby B or C. I hope that makes since. This is in Minecraft Bedrock Edition.

I tried:

/spreadplayers -96 -4 0 30 @a[x=-21,y=0,r=10]

But even when I have someone in that area it says "No targets matched selector".

Best Answer

You have to make Lobby A far enough away from Lobby B and C so that the command block doesn't affect it. I am also pretty sure you need to add @a