Add a player to a scoreboard if they aren't already on it
Sadly, I couldn't find this answer anywhere.
I'm going to refer to [score_deaths=1] as selectors, as I don't know their proper name.
Is there a selector for if a player isn't on a scoreboard (f.e. @a[score_not_on_deaths] or @a[score_deaths!])
Or, even better, is there a way to say player A just joined, he isn't on the scoreboard, /scoreboard players set A deaths 0
Is there a way or a workaround? Also, this is using a /fill clock, so you can only use one command. Thanks!
Best Answer
You can add all players to a scoreboard and keep all other players unaffected by adding 0 to the score for everyone:
/scoreboard players add @a deaths 0
All players without a score will have their score set to zero. All other players will be unaffected.
Pictures about "Add a player to a scoreboard if they aren't already on it"



How do you add players to a scoreboard in Minecraft?
Managing TeamsMinecraft Scoreboard Command Tutorial [1.18]
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: cottonbro, Anna Shvets, cottonbro, cottonbro
