Roll a die for everyone
/random roll 1..6Draws a number from 1 to 6 and announces the result to all players.

/random picks a random whole number in a range. value shows it only to you, roll announces it to every player, and both can feed a score through /execute store. Named sequences give repeatable results, and reset gives them a new seed.
/random reset (*|<sequence>)/random roll <range> [<sequence>]/random value <range> [<sequence>]// Exceptions: /random reset, /random roll <range> <sequence> and /random value <range> <sequence> need level 2.
/random reset/random reset (*|<sequence>)| Argument | Expects | What it does |
|---|---|---|
| seedoptional | Whole number | Whole number used as the new seed of the sequence, for example 1234. |
| includeWorldSeedoptional | true / false | true or false: whether the world seed is mixed into the new seed. |
| includeSequenceIdoptional | true / false | true or false: whether the sequence ID is mixed into the new seed. |
| sequence | Resource ID | Name of a random sequence, for example mypack:dice. Requires permission level 2. |
/random roll/random roll <range> [<sequence>]| Argument | Expects | What it does |
|---|---|---|
| range | Range (1..5) | Range to draw from, both bounds included, for example 1..6 or -10..10. |
| sequenceoptional | Resource ID | Name of a random sequence, for example mypack:dice. Requires permission level 2. |
/random value/random value <range> [<sequence>]| Argument | Expects | What it does |
|---|---|---|
| range | Range (1..5) | Range to draw from, both bounds included, for example 1..6 or -10..10. |
| sequenceoptional | Resource ID | Name of a random sequence, for example mypack:dice. Requires permission level 2. |
/random roll 1..6Draws a number from 1 to 6 and announces the result to all players.
/random value 1..100Shows a number from 1 to 100 to you only, for example "Randomized value: 42".
/execute store result score @s dice run random value 1..6Saves a number from 1 to 6 in your dice score, ready to test with execute if score.
/random value 1..10 mypack:lootTakes the next value of the mypack:loot sequence. Needs permission level 2.
/random reset mypack:loot 1234Gives mypack:loot the seed 1234, so the following values form a repeatable series in this world.
Fill in the fields, then copy the command.
Command generatorrandom value 1..6 answers "Randomized value: 4" to you alone, while random roll 1..6 posts "Steve rolled 4 (from 1 to 6)" for everyone, like a dice throw on a server. Both bounds are included, so always write the two of them. Players without cheats can use value and roll on their own; a named sequence and reset need permission level 2.
To act on the result, store it: execute store result score @s dice run random value 1..6, then test it with /execute if score @s dice matches 6. That is how random rewards, events or teleports are built with /scoreboard. To pick a random entity instead, a selector like @r or @e[sort=random,limit=1] is simpler, and /loot already handles random item drops.
A sequence is a named random generator, for example mypack:dice. Reset with the same seed, it produces the same series of values again, which helps for fair or reproducible minigames. reset sets a new seed, and its two booleans choose whether the world seed and the sequence ID are mixed into it. reset * resets every sequence at once.
✓ Checked in Java Edition 26.3 · updated 2 November 2026
Yes, both bounds are included: 1..6 can return 1, 2, 3, 4, 5 or 6.
Use /execute store result score @s dice run random value 1..6. The dice score then holds the drawn number.
Type it in the chat, no cheats needed: /random roll <range> [<sequence>]. Exceptions: /random reset, /random roll <range> <sequence> and /random value <range> <sequence> need level 2.
Every player. Exceptions: /random reset, /random roll <range> <sequence> and /random value <range> <sequence> need level 2.
It is in the official command tree since Java Edition 1.20.2.
/triggerEveryone/teamCheats/computeCheats/stopwatchCheats/datapackCheats/reloadCheats/executeCheats/scoreboardCheats