Updated:
1. Setup (once)
/team add it "Tagger"
/team modify it color red
/team add run "Runner"
/team modify run color aqua
/scoreboard objectives add caught deathCount
/gamerule minecraft:keep_inventory true
/gamerule minecraft:immediate_respawn true
A tagged runner falls and respawns at once as a tagger. deathCount counts those falls. In 1.21.10 and earlier the rules are keepInventory and doImmediateRespawn.
2. Pick teams
/team join it Steve
/team join run Alex Sam Kai
3. Glowing, one-hit taggers
Put each line in its own repeating, always active command block:
/effect give @a[team=it] minecraft:glowing 2 0 true
/effect give @a[team=it] minecraft:strength 2 255 true
/effect give @a[team=it] minecraft:resistance 2 4 true
Glowing shows taggers through walls, Strength makes one hit enough, and Resistance V stops runners hurting taggers. See glowing commands.
4. Caught runners become taggers
/execute as @a[team=run,scores={caught=1..}] run team join it @s
/scoreboard players reset @a caught
The first line goes in a repeating block, the second in a chain block behind it.
5. Start and win
/scoreboard players reset @a caught
/tp @a[team=run] 0 64 0
/tp @a[team=it] 0 64 30
/title @a title {"text":"Go!","color":"gold"}
/execute unless entity @a[team=run] run title @a title {"text":"Taggers win!","color":"red"}
For a time limit, reuse the timer from the hide and seek guide. Afterwards, stop the repeating blocks and run /team empty it.
Troubleshooting
- Tags do nothing: check the Strength block is running.
- Taggers die: amplifier 4 is Resistance V.
- Items scatter: turn keep inventory on.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.