0

I am creating a map in Minecraft Java Edition 1.15.2.

I would like to be able to get the X coordinate of a player and store it in a scoreboard value.

How can I do this?

1 Answer 1

2

This can be accomplished fairly easily using the /execute store and /data get commands:

/execute store result score <player or fake player name> <objective name> run data get entity <player> Pos[0]

(the Pos array is in the order [X, Y, Z], so Pos[0] is the X coordinate)

2
  • I know this I found my problem answer 3 days ago Jul 6, 2020 at 6:34
  • @OyunMıknatısı If you liked this answer, please click the check button to the left to let everyone know that the problem is solved. Jul 9, 2020 at 0:44

You must log in to answer this question.

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