0

I was looking for a command and I found this:

/execute @a[x=a,y=b,z=c,r=d] ~ ~ ~ tp @p e f g

Where:

  • a, b, and c are the XYZ coordinates that you want to teleport players from.
  • d is the radius in blocks around that point where players will be selected (min 1)
  • e, f, and g are the XYZ co-ordinates that you want to teleport players to (i.e. the destination)

My command turned out to be:

execute @a[-122,4,-74,999] ~ ~ ~ tp @-124 27 -74

It doesn't work and I don't know why.

2
  • It seems you are only using three parameters where the example shows four, namely p, e, f, and g (or @p is simply missing). Could that cause the problem?
    – Joachim
    Commented Sep 25, 2021 at 13:30
  • What do you mean it “doesn’t work”? Are you receiving an error? Are you not receiving a desired output? Please edit your post to include this information. Commented Sep 25, 2021 at 14:51

1 Answer 1

1

Firstly, the command you found is outdated. It is for pre-1.13 versions of Minecraft.

Secondly, the simplest usage to teleport someone to a spot would be this:

tp Steve -124 27 -74

It seems that this is a working solution to your problem.

To only teleport a player's inside the coordinate 122 4 999, use:

tp @a[x=-122,y=4,z=999,dx=0] -124 27 -74
2
  • i want to tp some one if they touch a certain y position with command blocks automaticly
    – Whackos108
    Commented Sep 29, 2021 at 3:44
  • I edited my answer. Could you please clarify your question?
    – ginkgo
    Commented Sep 29, 2021 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.