Updated:
Check Previous Output first
Open the command block and look at Previous Output near the bottom. If it shows a message, the block runs and the command itself is the problem. If it is empty, the block probably never runs. On Java, also make sure output tracking is not switched off with the O/X button beside the box.
The block does not run
1. Command blocks are disabled on the server
Servers need enable-command-block=true in server.properties (the default is false), then a restart. On Bedrock, check that the commandblocksenabled game rule is on.
2. Redstone and mode
With Needs Redstone, check that a signal really reaches the block. An impulse block runs once when the signal turns from off to on; leaving a lever on will not run it again. For constant running, use Repeat with Always Active.
3. Chain direction and settings
A chain block runs after the block whose arrow points into it. A wrong direction, or a chain set to Needs Redstone, stops the line. Set chain blocks to Always Active.
4. The block is in an unloaded area
Blocks far from every player are in unloaded chunks and do not run. Keep the area loaded with /forceload on Java or /tickingarea on Bedrock.
It runs, but nothing happens
5. The command has a mistake
Type the same command in chat. If it fails there, it fails in the block. Check for the wrong edition or an outdated format.
6. @s and ~ mean the block
Inside a command block, the runner is the block: @s selects nobody and ~ ~ ~ is the block's position. Switch to a player with execute as @p at @s run …. See execute as vs at.
7. Conditional mode
A Conditional block only runs when the block behind it succeeded. If that one fails, so does this one. Switch back to Unconditional if you did not mean it.
Checklist
- Is there a message in Previous Output?
- Are command blocks enabled in server.properties or the game rule?
- Are redstone and Always Active set correctly?
- Do chain arrows point the right way?
- Does the same command work in chat?
Paste the command into the Command Error Doctor to spot syntax and edition mistakes.
Common questions
- I cannot open the block. You need creative mode and operator permission (cheats on in single player).
- A repeating block causes lag. It runs 20 times a second. Narrow wide
@esearches withtypeordistance. - Output says it ran but nothing changed. The selector probably matched nobody; see No entity was found.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.