2
TP'ing entities to custom dimensions
Oki, so I'm making a custom dimension world, and I want to be able to TP nonplayers to that dimension. Of course, a player should be nearby, and they need to be in a certain radius. But my commands don't work. Not even on players. Any help?
Create an account or sign in to comment.
4
1
/Execute in <dimension> run tp @e[name=<name>] ~ ~ ~
I do not know how to select a specific entity that activate the command block, but this should work if it is a specific entity.
I do not know how to select a specific entity that activate the command block, but this should work if it is a specific entity.
2
it's general entities
1
Ok I figured it out:
/Execute in <dimension> run tp @e[sort=nearest, limit=1] ~ ~ ~
This should teleport the nearest entity
Just replace "~ ~ ~" with the coords you want them to end up at.
/Execute in <dimension> run tp @e[sort=nearest, limit=1] ~ ~ ~
This should teleport the nearest entity
Just replace "~ ~ ~" with the coords you want them to end up at.
1
thanks