Minecraft – Add up teams scores

minecraft-commandsminecraft-java-edition

I am using the /scoreboard command. I have everything working, but I would like not only all the players indivisual scores on the sideboard, but also the two teams. I would like them to update constantly or if necissary about 1 times a second. There are two teams blue and red, and every time someone presses certain buttons, they trigger command blocks that add one point to their idivisual scores. Thanks for your help!!

dGramop

Best Answer

Every second, on some kind of clock, activate the following commands, in this order:

/scoreboard players set Red points 0
/scoreboard players operation Red points += @a[team=Red] points

Where points is your scoreboard objective. You will also need to do this for Blue.