I already tried this link and many other, but it doesn't work. I think it's because I use a newer version and the commands are not the same.
I want to teleport every player to 83 15 -177 if he is on the block 171 14 169
I already tried these commands:
/execute @a[x=-71,y=14,z=169] run tp @p 83 15 -177this command won't work because first you have to put after the/executea subcommand/execute at @a[x=-71,y=14,z=169] run tp @p 83 15 -177here it teleports me all the time
Can someone give the command that it only will tp me if im on the above given coordinates for the version 1.16.5?
11 Answer
Command:
tp @a[x=171,y=14,z=169,distance=..0.5] 83 15 -177
How you can use this:
- Give yourself a command block.
/give @s command_block
2. To avoid having your chat being over run by messages, set gamerule CommandBlockOutput to false./gamerule commandBlockOutput false
3. Go to the purple block and stand on top of it. Once you are standing on the block, hold shift + f3 to find your coordinates. These will be referred to as x1, y1, and z1.
(Optional) Type your coordinates into chat to help you remember them.
4. Now, go to the red block, and repeat step 3. These will be referred to as x2, y2, and z2.
5. Now, go to where you want the command block to be placed, and place it there.
6. Right-click your mouse on it, and changeImpulsetoRepeat.
7. Now changeNeeds RedstonetoAlways Active.
8. Now typetp @a[x=X1,y=Y1,z=Z1,distance=..0.5] X2 Y2 Z2into the area that saysConsole Command.
9. HitDone.