Scratch Control Block Tutorial: Full Guide with Loops, Conditions, Cloning & Code Examples

Scratch Control Block Tutorial Full Guide with Loops, Conditions, Cloning & Code Examples

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.

Let’s dive in and unlock the power of Scratch control blocks!

Watch the complete video tutorial – 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). en.scratch-wiki.info

Some of the control blocks are:

  • wait (n) seconds — pause execution
  • repeat (n) — repeat a set number of times
  • forever — loop indefinitely
  • if <condition> then
  • if <condition> then else
  • wait until <condition>
  • repeat until <condition>
  • stop [this script / other scripts in sprite / all]
  • create clone of …
  • when I start as a clone
  • delete this clone

Key Control Blocks & Scenarios

Control blocks in Scratch determine how and when your code runs. They are essential for:

  • Loops (repeating actions)
  • Conditionals (making decisions)
  • Timing (delays and waits)
  • Cloning (creating multiple sprite instances)
  • Stopping actions

Let’s explore each type of control block in Scratch, complete with real-world use cases, sample code, and enhancement ideas.

Watch this section on YouTube: Scratch Control Block Tutorial – Full Demo by Kodex Academy

BlockWhat it DoesExample Use Case
Wait (n) secondsPauses script for n seconds before continuingDisplay a message, wait, then change costume. Or in a game: wait 1 second before enemy appears.
Repeat (n) timesLoops the inside blocks n timesWalk 10 steps, play sound 5 times, spin 20° repeatedly.
ForeverLoop infinitely until script is stoppedKeep spinning, keep checking for key presses, continuously animate a sprite.
If thenRuns blocks only if condition is trueIf score ≥ 50, show “You Win”.
If then elseOne path if true, another if falseIf touching a border → bounce, else keep going.
Wait UntilPause until condition becomes trueWait for score ≥ 50; or wait until touching color or a sprite.
Repeat UntilRepeat loop until the condition becomes trueRepeat move 10 steps until at edge.
Stop [script / other scripts / all]Stops specific or all scriptsEnd the game, stop animations when win condition met.
Create Clone of (sprite)Generates duplicates of a spriteCreate many falling objects in a game.
When I Start as a CloneThis hat block runs when a clone startsEach clone might move, change costume, or behave differently.
Delete This CloneDeletes the clone to avoid clutterRemove clones when they reach edge or are no longer needed.

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:

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:

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:

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:

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:

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:

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:

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:

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:

10. When I Start as a Clone

Purpose:

Runs a script when a clone is created.

Scenario:

Make cloned bullets move forward.

Sample Code:

11. Delete This Clone

Purpose:

Deletes the clone once its purpose is complete.

Scenario:

Remove bullets once they leave the screen.

Combined Example:

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

2. Flash Screen When Game Over

3. Use Variables for Flexible Loops

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 wait and wait 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.

Call to Action

  1. Don’t forget to check out the full video tutorial: Scratch Control Block Tutorial | Full Tutorial with Live Examples for Beginners by Kodex Academy
  2. Like, comment & share the video
  3. Visit kodexacademy.com
  4. subscribe to the Kodex Academy YouTube channel for deeper Scratch content.

Happy coding with Kodex Academy! 🚀

Learn More with Kodex Academy

At Kodex Academy, we’re passionate about helping students learn coding in creative ways. This project teaches more than Scratch—it empowers young minds to build tools that work in the real world.

Explore more:

Stay updated with new content, free tutorials, and coding challenges!

Further Reading & Links

Recent Posts

How to Make a Math Racing Game in Scratch | Game Concepts and Complete Tutorial

In this tutorial, you’ll learn to build a Math Racing Game in Scratch. Players solve math problems to move their character forward; wrong answers benefit the opponent. It’s a race of speed, accuracy...

How to make Memory Skill Game in Scratch | Card Matching Game in Scratch – Part 2 | Step-by-Step Coding

In this tutorial you'll learn how to make memory skill game in Scratch / card matching game in Scratch. This is a great beginner‑to‑intermediate project for scratch tutorial game, scratch programming...

How to make a Card Matching Game in Scratch | Memory Skill Game in Scratch – Part 1 | Step-by-Step Coding

In this Scratch tutorial, we'll walk you through how to make a card matching game in Scratch, also known as a memory game or skill game. This is a popular beginner project that introduces essential...

Create a Quiz Game in Scratch | Spelling Test in Scratch | Picture Identification in Scratch

Want to make learning spelling fun, visual, and interactive? In this Scratch tutorial, you'll learn how to make a spelling quiz game in Scratch using picture identification, text-to-speech, and...

How to make a Double Jump Game in Scratch | Platformer game in Scratch | Step by Step Coding

How to make a Double Jump Game in Scratch. Scratch is a fantastic platform for beginners to learn programming by making games, animations, and interactive stories. Among the many kinds of games...

How to Use Variables in Scratch | Variable Blocks in Scratch | Complete Tutorial

Introduction: Variable Blocks in Scratch Whether you’re just getting started with Scratch programming or looking to take your projects to the next level, understanding variables and lists is...

How to Make Earth Revolve Around the Sun in Scratch: A Complete Tutorial & Enhancements

Animating Earth revolving around the Sun is a classic beginner/intermediate Scratch animation project. It combines trigonometry (sine & cosine), variables, loops, and visual scripting. Kids can learn...

How to Make a Game in Scratch | Snake Game in Scratch | Step-by-Step Game Coding

In this tutorial, we’ll build a Snake Grid style game in Scratch step by step (very similar to the Kodex Academy example). By doing this, you’ll cover many of the core Scratch building blocks. We will...

How to Use Operator Blocks in Scratch | Full Guide with Live Coding & Examples

One of the most powerful features in Scratch is its Operator Blocks — essential for handling math operations, logic comparisons, and string manipulations...

How to Create a Thirsty Crow Story in Scratch | Animation Story in Scratch for Kids

In this tutorial, you’ll learn how to create the classic “Thirsty Crow” story in Scratch, using simple animation, voice, and sprite actions. This is a perfect project for kids who are new to coding...

How to Create a Dodge Ball Game in Scratch: A Complete Step-by-Step Tutorial for Beginners

This step-by-step tutorial will guide you through how to create a Dodge Ball game in Scratch from scratch! In this game, you’ll control a character trying to dodge falling balls, earn points, and...

How to use Sensing Blocks in Scratch | Scratch programming for beginners | Live Coding with Examples

In today’s session, we’re diving deep into one of the most powerful features of Scratch — Sensing Blocks. These blocks allow your projects to interact with the world, detect touches, respond to...

Build an Egg Shooting Game in Scratch: Step-by-Step Coding | Complete Guide for Beginners

Learn how to create a fun, interactive shooting game in Scratch with this detailed tutorial inspired by classic arcade games. Perfect for kids and beginners looking to dive into Scratch programming!...

How to Make a Maze Game in Scratch | Step by Step Coding | Full Tutorial & Enhancements

Introduction: Why Build a Maze Game in Scratch? If you’re looking for a Scratch beginner project idea that’s fun, interactive, and educational, then building a maze game in Scratch is the...

Scratch Control Block Tutorial: Full Guide with Loops, Conditions, Cloning & Code Examples

“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...

How to Create a Car Racing Game in Scratch – Part 2 – Step-by-Step Coding

Welcome to your ultimate guide on how to make a car racing game in Scratch—a step‑by‑step tutorial. You'll learn Scratch game development techniques, see actual code blocks, and discover enhancements...

How to Make a Hurdle Jumping Game in Scratch – Build a Fun Hurdle Runner with Score & Win Screen

Are you ready to create your very own hurdle jumping game in Scratch—just like the iconic Chrome Dino or Super Mario? 🎮 Whether you're new to Scratch or just looking for your next fun project, this...

How to Create a Car Racing Game in Scratch – Part 1 – Step-by-Step Coding

In this Scratch car racing game tutorial, we’ll walk you through how to create a fully functional, visually exciting, and incredibly fun car racing game using Scratch. In this blog, we’ll cover: How...
Scroll to Top