# Chapter 8: Random Numbers & Variety > Make games replayable and lively using "pick random" for spawn positions, dice rolls, and enemy timing. Chapter 8: Random Numbers & Variety — Scratch Daizen English Textbook. Make games replayable and lively using "pick random" for spawn positions, dice rolls, and enemy timing. ## Lesson goal & core concept Control randomness cleanly and store random choices in variables when needed in multiple checks. Every time a "pick random" block runs, it generates a fresh number. If you want to test the same random roll in three "if" blocks, save it to a variable first! ## Step-by-step practice Work through these steps in the Scratch editor, predicting each result before clicking the green flag. - Roll a 1–6 die into a variable named "roll". - Spawn falling stars at x = pick random (-210) to (210). - Add varied wait times: wait (pick random (0.5) to (1.5)) seconds. - Verify that both endpoints (min and max) can appear. **Chapter 8: Random Numbers & Variety — Example** - When green flag clicked - Set (roll) to (pick random (1) to (6)) - Say (join (You rolled: ) (roll)) for (2) seconds Try it: Picks a single fair roll and displays it cleanly. ## Mini challenge & next steps Make a coin-flip simulator (1 = Heads, 2 = Tails) that counts how many Heads appear in 20 flips. - [Scratch Learning Textbook Home](/en/textbook/): Return to the full 4-stage curriculum overview. - [Scratch Block Dictionary](/en/dictionary/): Look up any block used in this chapter. Updated: 2026-11-23 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/textbook/ch08-random/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)