Say I have a scoreboard named var, is there a way to use this score as an argument in a command, for instance:

\tp playername ~ playername.var ~

Which should teleport the player with the name playernameto the y coordinate equal to their var score?

Edit: My question is is this possible, not what mods support this or is this a suggestion for a new feature.

  • Lel i want this in minecraft. It woulld greatly enhance it. What you could try is tping and invisible mob to the location that you want them to be and then tp them to that mob. – Reflexive Feb 26 '17 at 13:21
  • @rivermont-WillB. They're asking if there's any way to do it, not a suggestion to add it as a feature. – SirBenet Feb 26 '17 at 15:36
  • This isn't possible, but you could use armourstands. – Okx Feb 26 '17 at 16:46

No, this is not possible (well, easily)

Minecraft sadly does not support insertion of scoreboard scores anywhere in a command, they can only be used in selectors (e.g. @a[score_myScore_=1]) or in the /scoreboard players test command.

However, there are a few (albeit complicated) workarounds. They work by running a bunch of conditional teleportation commands using distances decrementing in binary.

This command block modules fits your example, although I believe it uses the 1.8 command blocks. It shouldn't be too hard to adapt though, the mechanism is fairly intuitive.

However, that only fits your specific case. There is no general solution. 90% of the time you'll be able to do some binary version for that specific situation though, and if you ever make a good one, please let the community know :D


You can access scoreboard values like so

/tp player player{scoreboard=var=(what their score is)} 
  • Hi lucas, we prefer if answers can give a little context - can you add a little explanation as to how exactly this works? – Robotnik Feb 27 '17 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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