Hello
By using the tp cmd in an command block I was not teleported correctly.
So, I add the cmd tp @e[type=minecraft:player,distance=..2] ~ ~1 ~
The result is teleporting me 1 block negative Z not positive Y
Comments 5
So. I dont want teleporting the command block. I want teleporting the player to reletive coordintes.
The cmd tp @p[distance=..2] ~ ~1 ~ and execute if entity @p[distance=..2] run tp @p[distance=..2] ~ ~1 ~ are same.
I can not teleport players or entities from there position to relative coordinates.
Teleport commands do not teleport relative to the target, not since 1.13; commands have 4 variables: who (@s), facing (x/y rotation), position (x, y, z), and dimension, none of these are related to eachother. Using /execute you can change these variables. If run in command blocks, it runs as the command block (no @s) at the command block. Saying to teleport 1 block up means 1 block above the execution position, so 1 block above the command block.