Score or Lives Not Resetting on Replay
📌 What you will learn
Stop leftover values from the previous game by initializing every variable under the green flag.
Core approach
Scratch remembers variable values between runs until your code explicitly resets them. Always add a dedicated initialization block at startup.
- Set score = 0, lives = 3, level = 1 right under "When green flag clicked".
- Use "broadcast [Reset] and wait" before starting gameplay loops.
- Test clicking the green flag twice in a row after finishing a game.
Pro tip & next steps
Double-green-flag testing catches almost every initialization bug before sharing.
FAQ
What is the best first step for "Score or Lives Not Resetting on Replay"?
Set score = 0, lives = 3, level = 1 right under "When green flag clicked". Double-green-flag testing catches almost every initialization bug before sharing.
This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.