/

/random

no op neededTechnical

/random returns a number in a range. value rolls quietly and returns the result for /execute store; roll announces it in chat. A named sequence makes the rolls reproducible from the world seed.

Command1 to fix
13
/random value
  • Range is required.
Press C to copy

Range is required.

optional

Examples

  • Roll a d6
    /random value 1..6

Common questions about /random

How do I put a random number into a scoreboard?

/execute store result score @s roll run random value 1..6.

Are the results reproducible?

Only if you name a sequence. A sequence derives its rolls from the world seed and its own name, so the same sequence gives the same results every time; an unnamed roll does not.