0

I'm making a datapack and I want to make it so that when people spawn on a certain block you teleport to the same block in the Nether. However, nothing happens.

This is my code:

execute as @e[tag=spawn] run execute if entity @a[tag=blazeborn,distance=0..1,scores={spawn=1..30}] run execute in the_nether run tp @a[tag=blazeborn,distance=0..1,scores={spawn=1..30}] ~ ~ ~

1 Answer 1

2

Distance doesn't work across dimensions.
Also the execute command takes multiple arguments, so you don't need to do ... run execute ....

I assume the entity with tag 'spawn' is an armor stand on the block you want to teleport from, although you could switch that out for a positioned statement in the execute.

The fixed command would be:

execute at @e[tag=spawn] as @a[tag=blazeborn,distance=0..1,scores={spawn=1..30}] in the_nether run tp @s ~ ~ ~

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .