How to run commands depending on players scoreboard?
//ads -- adsterra.com -- native banner
?>
How can I teleport players based on their score on the scoreboard? For example, only if there scoreboard score is 1.
Best Answer
In the selector arguments, use score_SCORENAME= and 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
Pictures about "How to run commands depending on players scoreboard?"



How do you use scoreboard command?
Scoreboard CommandHow do you run an IF score?
If you only want it to run the command the first time they join, try this:/execute if score // Minecraft 1.19 Command Tutorial
More answers regarding how to run commands depending on players scoreboard?
Answer 2
/execute @a[score_(YOUR SCOREBOARD NAME)_min=(MINIMUM SCOREBOARD VALUE)] ~ ~ ~ /(COMMAND TO EXECUTE ON SELECTED PLAYER)
I used
/execute @a[score_rightClick_min=1] ~ ~ ~ /kill @p
to detect when someone used a carrot on a stick by setting up a scoreboard called rightClick.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Pixabay, Pixabay, Pixabay, Patrick Case
