As of Minecraft 1.13, commands are executed at the position of the command block/entity which executed the command by default. So your "~ ~ ~" is referring to the command block and not the player. Use the at keyword to specify where the command should be executed:
execute as @a at @s if entity @s[x=-5,y=64,z=-5,dx=10,dz=10] run teleport @s ~ 70 ~ ~ ~
I'm trying to make an invisible cube that teleports you inside when you touch the edge.
the command is: execute as @a if entity @s[x=-5,y=64,z=-5,dx=10,dz=10] run teleport @s ~ 70 ~ ~ ~
The problem is that even if they are ~, rotation and coordinates x and z are always set the same as the command block
What am i doing wrong?
As of Minecraft 1.13, commands are executed at the position of the command block/entity which executed the command by default. So your "~ ~ ~" is referring to the command block and not the player. Use the at keyword to specify where the command should be executed:
Command block engineer // Developer // #TeamTrees