How to run commands depending on players scoreboard?
How can I teleport players based on their score on the scoreboard? For example, only if there scoreboard score is 1.
3 Solutions collect form web for “How to run commands depending on players scoreboard?”
/tp @p[score_*Score*_min=1] x y z
In the selector arguments, use
score_SCORENAME_min=. For example, to teleport a player with at least 1 of a “Kills” objective:
/tp @a[score_Kills_min=1] 0 70 0
/execute @a[score_(YOUR SCOREBOARD NAME)_min=(MINIMUM SCOREBOARD VALUE)] ~ ~ ~ /(COMMAND TO EXECUTE ON SELECTED PLAYER)
/execute @a[score_rightClick_min=1] ~ ~ ~ /kill @p
to detect when someone used a carrot on a stick by setting up a scoreboard called