if < > then — Scratch Block Guide
Runs the enclosed blocks only when the hexagonal condition is true.
What this block does
Runs the enclosed blocks only when the hexagonal condition is true.
React to key presses, collisions, high scores, or item pickups.
- Category: Control Blocks
- Key tip: Wrap "if" inside "forever" when you want continuous checking during gameplay.
Working Scratch example
Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.
- When green flag clicked
- Forever
- If (score) 9> then
- Say You win!
Try it: Announces victory as soon as score reaches 10.
Related block guides
Explore other blocks in the same category or return to the full English Block Dictionary.
FAQ
When should I use "if < > then" in Scratch?
React to key presses, collisions, high scores, or item pickups. Wrap "if" inside "forever" when you want continuous checking during gameplay.
This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.