-2

I put in this command and it didn't work:

/execute @a ~ ~ ~ detect ~ ~-1 ~ emerald_block 0 tp @s 30 30 30

How can I make the code work?

1
  • What version (bedrock/java)?
    – Penguin
    Mar 14, 2021 at 7:03

1 Answer 1

2

This would be the correct way:

/execute @a ~ ~ ~ detect ~ ~-1 ~ emerald_block 0 tp @s 30 30 30

You can put this in a repeating command block. I don't know why it didn't work for you, but it works fine when I try it. Maybe you didn't put it in a repeating command block that has Redstone as always active.

I just assumed you used bedrock edition because of the syntax but if you're using java edition this is the correct command:

/execute as @a at @s if block ~ ~-1 ~ minecraft:emerald_block run tp @s 30 30 30

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