So the problem I have here is I want to teleport a player standing at
1 34 70 to
273 33 -5.
I have tried using a clock with
testfor @a [x=1.3,y=34,z=70] hooked up to a
tp @p 273 33 -5 but when I go to
1 34 70 I don't get teleported.
I can see several issues with your setup.
testforhere. The beauty of target selectors is that they work the same in all commands, including
(the target selector arguments)
All things considered, the command you are looking for is simply
tp @a[x=1,y=34,z=70,r=1] 273 33 -5
or using 4 argument shorthand:
tp @a[1,34,70,1] 273 33 -5
You have a space between the selector and the arguments. Remove that space to make your selector:
The coordinates in selectors cannot be decimals. As you are looking for someone at 1, 34, 70, just use those coordinates:
You are testing if someone is at 1, 34, 70, and then if there is, teleporting the nearest player to the command block to 273, 33, -5. What you actually want to do is teleport the person at 1, 34, 70 to 273, 33, -5. You should put the selector arguments into the
There's no radius specified. You need to specify a radius from that point to test for. I'd recommend either a radius of 0 if you want to test just that block.
Fixing this should give you a working command:
tp @a[x=1,y=34,z=70,r=0] 273 33 -5
You could also compact this down into:
tp @a[1,34,70,0] 273 33 -5
Here is the wiki page on commands, which may be useful to read up on: