NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

set (score) to (0) — Scratch Block Guide

📌 What you will learn

Replaces the variable’s current value with a new number or string.

What this block does

Replaces the variable’s current value with a new number or string.

Reset score, lives, and game state at startup.

  • Category: Variables & Lists
  • Key tip: Never put "set score to 0" inside a forever loop, or your score will stay stuck at 0.

Working Scratch example

Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.

Example using set (score) to (0)
  1. When green flag clicked
  2. Set score to 0
  3. Set lives to 3

Try it: Guarantees every new game starts fresh with 0 score and 3 lives.

Related block guides

Explore other blocks in the same category or return to the full English Block Dictionary.

Back to Variables & Lists See the overview and patterns for Variables & Lists. Learn more → Scratch Block Dictionary (All Categories) Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Learn more →

FAQ

When should I use "set (score) to (0)" in Scratch?

Reset score, lives, and game state at startup. Never put "set score to 0" inside a forever loop, or your score will stay stuck at 0.

This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.