/scoreboard
Create objectives and keep score - the foundation of mini-games.
Overview
What is the /scoreboard command?
The /scoreboard command creates objectives and tracks numbers for players and entities โ kills, deaths, custom counters, timers and triggers. Combined with /execute, scoreboards are how datapacks store variables and build logic, and they also power the visible sidebar and below-name displays.
If /execute is the processor, scoreboards are the memory: nearly every non-trivial command system uses them.
When to use it: Use /scoreboard to track scores and store variables โ kill counts, timers, minigame points, and datapack logic.
At a glance
Syntax
/scoreboard objectives add <name> <criteria>See it
What it does
Anatomy
Every part, explained
- 1
CommandRequired/scoreboardManages objectives and player scores.
- 2
ActionRequiredobjectives addAlso: 'players add/set/get' to change scores.
- 3
NameRequired<name>Your id for the objective, e.g. kills.
- 4
CriteriaRequired<criteria>What it tracks, e.g. dummy, playerKillCount.
Your turn
Try it yourself
Copy & paste
Examples
/scoreboard objectives add kills playerKillCountTrack player kills automatically.
/scoreboard players set @s kills 0Reset your kill score.
/scoreboard players add @s kills 1Manually add a point.
Avoid these
Common mistakes
/scoreboard add kills dummy/scoreboard objectives add kills dummyYou must say 'objectives' (or 'players') first.
/scoreboard objectives add kills kill/scoreboard objectives add kills playerKillCountUse a valid criteria name.
Good to know
Frequently asked questions
- How do you create a scoreboard objective?
- Run /scoreboard objectives add <name> <criterion>, e.g. /scoreboard objectives add kills playerKillCount.
- How do you show a scoreboard on the sidebar?
- Use /scoreboard objectives setdisplay sidebar <name> to display it on the right side of the screen.
- How do you set or change a player's score?
- Use /scoreboard players set <player> <objective> <value>, or add/remove to adjust it.
Keep going