How to swap players in Minecraft(BEDROCK)
Today I will show you how to swap positions of players in Minecraft Bedrock
COMMANDS:
/scoreboard objectives add Time dummy
/scoreboard players add @a Time 0
/scoreboard players add @e Time 1
Tower 1:
/execute if score shadowalker2465 Time matches 1000.. run scoreboard players set @e Time 0
/execute at shadowalker2465 run summon armor_stand ~ ~ ~
/execute at shadowalker2465 run tag @e[type=armor_stand,dx=1,dy=1,dz=1] add Swap1
/execute at @e[type=armor_stand,tag=Swap2] run tp shadowalker2465 ~ ~ ~
/kill @e[type=armor_stand,tag=Swap1]
Tower 2:
/execute if score shadowalker2465 Time matches 1000.. run scoreboard players set @e Time 0
/execute at Player_2 run summon armor_stand ~ ~ ~
/execute at Player_2 run tag @e[type=armor_stand,dx=1,dy=1,dz=1] add Swap2
/execute at @e[type=armor_stand,tag=Swap3] run tp Player_2 ~ ~ ~
/kill @e[type=armor_stand,tag=Swap2]