Scratch Control Block Tutorial: Full Guide with Loops, Conditions, Cloning & Code Examples
Block Programming
Introduction – Scratch Control Block Tutorial
Scratch is a fantastic programming language designed especially for beginners and kids to learn coding concepts through creative projects. One of the most important aspects of Scratch programming is understanding control blocks — the blocks that manage the flow of your program by controlling timing, repetition, decision-making, and cloning.
In this tutorial, we'll explore all the key Scratch control blocks, including loops like forever and repeat until, conditional blocks such as if and if-else, as well as cloning blocks that help create dynamic games and animations. You'll get live examples, step-by-step explanations, and tips on how to use these blocks effectively to build fun, interactive Scratch projects.
Whether you're a beginner just starting or a parent or teacher guiding young learners, this guide will give you a solid foundation in Scratch control blocks to create your own animations, stories, and games.
What You Will Learn:
This comprehensive guide teaches you how to:
- ✅ Understand what control blocks are and why they're essential
- ✅ Use timing blocks like
waitandwait until - ✅ Create loops with
repeat,forever, andrepeat until - ✅ Make decisions with
ifandif-elseconditions - ✅ Implement cloning for dynamic sprite creation
- ✅ Build practical projects like space shooter games
- ✅ Add enhancement features and advanced techniques
👉 Watch the Full YouTube Tutorial Here:
Scratch Control Block Tutorial | Full Tutorial with Live Examples for Beginners by Kodex Academy
What are Scratch Control Blocks?
"Control blocks" in Scratch are those blocks (from the Control category) that manage the flow of your script: when things happen, how many times they happen, making decisions, repeating actions, timing pauses, stopping or creating clones, etc. These are essential when doing Scratch programming for beginners, because they let your sprites do more than just move: they allow logic, loops, and interactivity.
According to the Scratch Wiki, Scratch 3.0 has 11 control blocks: one hat block (when I start as a clone), five C-blocks (loops & conditionals), three stack blocks (waits & clone creation), and two cap blocks (stop, delete clone).
Some of the control blocks are:
wait (n) seconds– pause executionrepeat (n)– repeat a set number of timesforever– loop indefinitelyifthen ifthen else wait untilrepeat untilstop [this script / other scripts in sprite / all]create clone of …when I start as a clonedelete this clone
Key Control Blocks & Scenarios
1. Wait (1) Seconds
Purpose: Pauses the script for the specified number of seconds.
Scenario: You want your sprite to say "Hello", wait for a moment, then say "Bye".
Sample Code:
say "Hello" for 2 seconds
wait 1 seconds
say "Bye" for 2 seconds
Enhancement: Add background music or animation between dialogues for engagement.
2. Repeat (10)
Purpose: Repeats the inner code a specific number of times.
Scenario: Rotate a sprite 15° ten times to make a full spin.
Sample Code:
repeat 10
turn clockwise 15 degrees
Enhancement: Make the repeat count dynamic using a variable (e.g., spinCount).
3. Forever
Purpose: Executes code inside the loop continuously until the program stops.
Scenario: Continuously check if a key is pressed and move the sprite.
Sample Code:
forever
if
move 10 steps
Enhancement: Add sound feedback when a key is pressed.
4. If <condition> Then
Purpose: Executes the blocks only if the condition is true.
Scenario: Display a message when the score is above 50.
Sample Code:
if <(score) > 50> then
say "You Win!"
5. If <condition> Then Else
Purpose: Allows decision-making with two paths: true and false.
Scenario: Show "You Win!" or "You Lose!" depending on the score.
Sample Code:
if <(score) > 50> then
say "You Win!"
else
say "You Lose!"
6. Wait Until <condition>
Purpose: Pauses the script until a condition becomes true.
Scenario: Wait until the player reaches the red line before saying "Stop!".
Sample Code:
wait until
say "Stop!"
Enhancement: Add an animation or countdown while waiting.
7. Repeat Until <condition>
Purpose: Keeps repeating an action until a condition becomes true.
Scenario: Keep moving the sprite until it touches the edge.
Sample Code:
repeat until
move 10 steps
8. Stop [all / this script / other scripts in sprite]
Purpose: Stops parts or all of your project.
Scenario: Stop the game when health drops to 0.
Sample Code:
forever
if <(health) = 0> then
stop all
9. Create Clone of [myself / sprite]
Purpose: Creates a duplicate (clone) of a sprite that can act independently.
Scenario: Shoot bullets by cloning a bullet sprite when the space bar is pressed.
Sample Code:
create clone of [myself]
10. When I Start as a Clone
Purpose: Runs a script when a clone is created.
Scenario: Make cloned bullets move forward.
Sample Code:
repeat until
move 10 steps
delete this clone
11. Delete This Clone
Purpose: Deletes the clone once its purpose is complete.
Scenario: Remove bullets once they leave the screen.
Combined Example:
repeat until
delete this clone
Practical Project Idea: Space Shooter Game for Kids
Combine these blocks to make a game where:
- The player sprite shoots bullets (using cloning).
- Enemies spawn from the top (also clones).
- Player score increases when bullets hit enemies.
- Game ends (Stop block) when health is 0.
Watch a step-by-step demo in the video: Click here to watch on YouTube
Enhancement Features with Code
1. Add Difficulty Over Time
set [enemySpeed v] to 1
forever
wait 10 seconds
change [enemySpeed v] by 1
2. Flash Screen When Game Over
repeat 10
set [background color v] effect to 100
wait 0.1 seconds
set [background color v] effect to 0
wait 0.1 seconds
stop all
3. Use Variables for Flexible Loops
set [loopTimes v] to 5
repeat (loopTimes)
move 10 steps
Conclusion
Understanding and using Scratch control blocks is a vital step in becoming a confident and creative programmer—especially for beginners and young coders. From simple delays and repeats to more advanced logic like conditions, loops, and sprite cloning, these blocks form the core of game development and interactive storytelling in Scratch.
In this tutorial, you've explored:
- How to repeat actions using loops (
repeat,forever) - How to use decision-making blocks like
if,if else - How to manage timing with
waitandwait until - How to build advanced features using cloning and stopping scripts
Whether you're building a fun animation, a storytelling project, or a full Scratch game, control blocks give you the power to manage logic, timing, and interaction like a pro.
🎯 Ready to Master Scratch Control Blocks?
Watch the complete video tutorial and start building amazing projects today!