How can I teleport a player from a specific place to another in Minecraft Bedrock Edition using command blocks?

I'm making a multiplayer map, and I need to teleport a player from one place to another. However, I have all the command blocks set up at a separate area, so I cant just say /to @p [x y z]. Is there any way to teleport a player from one particular spot to another?


You can use this @a[x=~,y=~1,z=~,dx=0,dy=0,dz=0] to target any player who is on top of the command block that is executing the command.

This command will teleport any player at the coordinates 100 50 100 to 150 60 150:

/tp @a[x=100,y=50,z=100,dx=0,dy=0,dz=0] 150 60 150