Scoreboard basics

The scoreboard is Minecraft’s way of storing numbers. Anything you need to count — points, attempts, a player’s state — is built on this command

Three words to get straight first

  • Objective — One board, e.g. a kill counter. Nothing can be stored until you create one
  • Criterion — What the board counts, and whether the game updates it or you do
  • Display slot — Where the board is shown. Assign none and nobody sees anything

The number one confusion here is creating an objective and assuming that is it — you still need a second command to make it visible

The criteria you will actually use

Criterion Who updates it Used for
dummy You, via commands The most-used one, because you control everything — minigame points, for instance
playerKillCount The game, automatically Counting how many other players someone has killed
deathCount The game, automatically Counting deaths — the basis of a limited-lives system
health The game, automatically Showing player health next to their name
trigger The player, via /trigger Letting ordinary players make a choice without operator permission

When in doubt pick dummy — you stay in full control and it is easier to change your mind later

The order you have to do things in

These three steps always run in this order. Skip one and it looks like nothing is working

  1. Create the board
  2. Assign it a display slot
  3. Change the numbers
/scoreboard objectives add kills dummy "จำนวนการฆ่า"
/scoreboard objectives setdisplay sidebar kills
/scoreboard players add @p kills 1

The first two lines are one-off setup. The third is the one that goes into a command block to run over and over

The three display slots

SlotWhere it showsGood for
sidebar The panel on the right of the screen The main scoreboard of a game — the most visible option
list The player list when you hold Tab A number people should see only when they go looking
belowName Under the nametag above a player’s head A value others should read from a distance — health, or lives left

A slot shows one board at a time — assigning a new board to the same slot immediately removes the old one from it

Using a score as a condition

A score becomes genuinely useful once you filter on it, which you do inside a target selector’s square brackets

  • @a[scores={kills=5..}] — players with a score of 5 or more
  • @a[scores={kills=0}] — players still on zero
  • @a[scores={lives=..0}] — players who have run out of lives — switch them to spectator

Combine it with execute and the whole system runs itself — announce a winner the moment anyone reaches 10 Read about execute

Common problems

SymptomCause
Created a board but nothing appears You have not run setdisplay yet
The board shows but everyone stays on 0 You used dummy, which the game never updates — you have to add points yourself
A long board name turns the command red Names containing spaces must be wrapped in quotes
Scores carry over into the next round You must run players reset or set them to 0 — nothing clears itself at the end of a round

Related tools

Other guides to read next

  • Minecraft command basics — Start from zero: how to enable cheats, where commands can be typed, and enough about selectors and coordinates to get going
  • Target selectors in depth — A deep look at the square-bracket arguments, from type and distance through limit and sort, plus how to work out why a command matched nobody
  • Coordinates: numbers, ~, and ^ — Why ~ and ^ cannot be mixed, why blocks end up in the wrong place, and which form to reach for in which situation
  • Command blocks — Take the commands you generated and run them automatically — once, on repeat, or chained one after another
  • Why an old give command stops working — Legacy NBT, 1.20.5 components, and 1.21.5 components side by side — compared using commands built by the generator itself
  • The execute command — The most powerful command in the game, taken apart piece by piece — how as differs from at, and why reordering changes the result
  • My command does not work — Work back from the error the game shows you, with the usual cause behind each one