Lets say i have a command block at x100 y80 z100 running execute if entity @e[distance=..6,x=10.5,y=8,z=10.5]
How do i teleport the entity that is being detected to x20 y8 z20 (The player/entity is being detected)
This is what i have but the player within that range of the command block is being teleported. execute if entity @e[distance=..6,x=10.5,y=8,z=10.5] run tp @a[distance=..6] 20 8 20 facing 25 7 20
Lets say i have a command block at x100 y80 z100 running execute if entity @e[distance=..6,x=10.5,y=8,z=10.5]
How do i teleport the entity that is being detected to x20 y8 z20 (The player/entity is being detected)
This is what i have but the player within that range of the command block is being teleported. execute if entity @e[distance=..6,x=10.5,y=8,z=10.5] run tp @a[distance=..6] 20 8 20 facing 25 7 20
I believe adding "at @a" is the solution to your problem.
Try this:
execute at @a if entity @e[distance=..6,x=10.5,y=8,z=10.5] run tp @a[distance=..6] 20 8 20 facing 25 7 20
Commands are fun