Motion Blocks
Move sprites, change their positions, control their directions, and create movement on the Stage.
Are you new to Scratch programming and feeling overwhelmed by all the colorful blocks? The problem is that many beginners look at Scratch’s block palette and don’t know where to start or which blocks to use for their projects. This confusion grows when you see experienced programmers effortlessly combining blocks to create amazing games and animations. The solution? Understanding the 10 main types of blocks in Scratch and how they work together to bring your creative ideas to life.
In this comprehensive guide, I’ll break down every category of blocks in Scratch, explain their purposes, and show you practical examples of how to use them effectively. Whether you’re a complete beginner, educator, or parent helping a child learn to code, this guide will transform you from confused to confident in no time!
Scratch uses color-coded programming blocks that fit together to create games, animations, stories, and interactive projects. Each block performs a particular task, such as moving a character, playing a sound, repeating instructions, or checking whether something is true.
Scratch 3.0 has nine core block categories, each designed for a different part of programming.
Move sprites, change their positions, control their directions, and create movement on the Stage.
Change a sprite’s appearance, switch costumes, adjust its size, and apply visual effects.
Play sounds, control audio playback, and add sound effects or music to projects.
Start scripts when events occur, such as clicking the green flag or pressing a keyboard key.
Repeat instructions, use conditions, wait for actions, and control how scripts run.
Detect interactions and input, such as touching another sprite or pressing a key.
Perform mathematical calculations, compare values, and combine logical conditions.
Store and update information, such as a player’s score, timer, or number of lives.
Create reusable custom blocks to organize code and simplify repeated instructions.
Scratch also supports extensions that add specialized functionality. For example, the Pen extension lets you draw on the Stage, while compatible hardware extensions allow projects to interact with external devices. Extensions add functionality beyond the nine core block categories.
Blocks are the fundamental building pieces of Scratch coding. Think of them as digital LEGO bricks – each block represents a specific command or instruction that tells your sprite (character) what to do. When you snap blocks together, you create scripts that control your sprite’s behavior.
According to educational research, block-based programming environments help students learn computational thinking concepts 60% faster than traditional text-based programming languages.
Swipe horizontally to view all four columns →
| Block Category | Main Purpose | Example Use | Typical Project |
|---|---|---|---|
| Motion | Moves sprites | Move 10 steps | Maze game |
| Looks | Changes appearance | Switch costume | Animation |
| Sound | Plays audio | Start a sound | Music game |
| Events | Starts scripts | When green flag clicked | Interactive project |
| Control | Repeats and branches instructions | Repeat 10 times | Jumping game |
| Sensing | Detects input and interactions | Touching an obstacle? | Catching game |
| Operators | Calculates and compares values | Score greater than 10? | Quiz game |
| Variables | Stores information | Change score by 1 | Scoring system |
| My Blocks | Creates reusable code | Define a custom movement block | Larger projects |
Note: These examples illustrate common uses of the nine core Scratch block categories. The exact blocks available depend on the category and the project setup. Scratch extensions add features beyond the core categories.
Pro Tip: Before diving deep into blocks, make sure you understand basic programming concepts in Scratch to maximize your learning experience.
Motion blocks (colored blue) control how sprites move around the stage. These are often the first blocks beginners use because movement creates immediate, visible results.
Motion blocks control a sprite’s movement and direction on the Scratch stage. For example, the move 10 steps block moves a sprite forward, while the turn blocks rotate it clockwise or counterclockwise. Combine these blocks to make characters walk, turn, and explore a game.
Basic Movement:

Position Control:
Position control blocks help you move a sprite to a specific location on the stage. The go to x: y: block sets its position, while change x by and change y by adjust its horizontal and vertical positions. These blocks are useful for creating moving objects, animations, and interactive games.

Practical Example: Creating a Moving Car
In this example, the car moves forward repeatedly. The if on edge, bounce logic makes it turn around when it reaches the edge of the stage. This creates a simple continuous movement effect that beginners can use as a starting point for racing games and animations.

Follow these simple steps to make a character move across the stage using Motion blocks.
when green flag clicked.move 10 steps below the event block.move 10 steps block.
Try different values to see how the movement changes.
Advanced Motion Techniques:
Motion blocks are essential for creating platformer games, maze games, and any project involving movement. Master these blocks first, as they form the foundation of most interactive projects.
Looks blocks (colored purple) control your sprite’s appearance, size, visibility, and visual effects. These blocks are crucial for creating engaging, polished projects.
Basic Appearance:
Basic Looks blocks control how a sprite appears and communicates on the Scratch stage. Use show and hide to control visibility, and switch costume to or next costume to change a sprite’s appearance. The say and think blocks display messages, making them useful for dialogue, instructions, and interactive stories.

Size and Effects:
Size and graphic effect blocks change how a sprite looks. Use change size by to make a character grow or shrink, or set size to to choose a specific size. Graphic effects, such as color, can create visual transformations for animations and games. Use clear graphic effects to return the sprite to its normal appearance.

Layer Control:
Layer blocks control which sprites appear in front of or behind other sprites. Use go to front layer to bring a sprite to the foreground, or go forward 1 layers to adjust its position in the layer order. These blocks are helpful when sprites overlap or when you want to create foreground and background effects.

Animation Sequences:
Costume animation creates the illusion of movement by switching between a sprite’s costumes. In this example, the script repeats the next costume block with a short wait between changes. Try this with a sprite that has multiple costumes to create a simple walking, running, or dancing animation.

Pulsing Effect:
A pulsing effect makes a sprite appear to grow and shrink repeatedly. The script increases the sprite’s size, waits briefly, and then decreases it again. Adjust the size values and wait times to create a subtle pulse or a more dramatic effect. This technique works well for glowing objects, collectibles, and buttons that attract attention.

Color-Changing Background:
This script continuously changes a sprite’s color effect, creating a shifting visual appearance. You can experiment with the effect value and wait time to change how quickly the colors cycle. This is useful for animated backgrounds and visual effects, but use it carefully to keep your project comfortable to look at.

Professional Tips:
Looks blocks are essential for drawing applications, animated stories, and any project where visual appeal matters. They’re particularly important in game development for creating engaging user interfaces.
You can use Looks blocks to animate a character, display dialogue, or change a sprite’s appearance. Follow these steps to create a simple costume animation.
when green flag clicked.
forever block below the event block.
next costume inside the
forever block.
wait 0.2 seconds block after
next costume to control the animation speed.
Once you understand the basics, experiment with character dialogue, costume animations, size changes, and graphic effects. Combining Looks blocks with Events and Control blocks lets you create more interactive Scratch projects.
Sound blocks (colored pink) add audio elements to your projects, from simple sound effects to complex musical compositions. Audio significantly enhances user engagement and provides important feedback.
Basic Audio:
Basic Sound blocks let you play audio effects in Scratch projects. Use play sound until done to play a sound and wait for it to finish before continuing the script. The start sound block plays a sound without waiting, while stop all sounds immediately stops all currently playing sounds. These blocks are useful for character dialogue, button clicks, and game sound effects.

Music and Instruments:
Music blocks let you create melodies directly in Scratch. Use play note to play a musical note for a specified number of beats, and set instrument to to choose an instrument. The set tempo to and change tempo by blocks control how quickly the notes play. Combine different notes and instruments to create simple songs and background music.

Volume Control:
Volume blocks control how loud sounds are in a Scratch project. Use set volume to to choose a specific volume percentage, or change volume by to increase or decrease the current volume. These blocks can help make background music quieter, emphasize important sound effects, or create interactive audio experiences.

Simple Music Player:
This script creates a simple music player by selecting a piano instrument, setting the tempo, and playing a sequence of notes. The repeat block plays the note sequence multiple times, making it easy to create a repeating melody. Experiment with different notes, instruments, and tempos to compose your own Scratch music.

Interactive Sound Effects:
Interactive sound effects make a Scratch project respond to user actions. In this example, pressing the space key plays a meow sound, while clicking the sprite plays a pop sound. You can use the same approach to add jumping sounds, button feedback, collision effects, or audio responses to a character’s actions.

Dynamic Volume Control:
This example adjusts the volume according to the distance between the sprite and the mouse pointer. When the pointer is within 50 units, the script sets the volume to 100%; otherwise, it sets the volume to 20%. This demonstrates how Sensing, Control, and Sound blocks can work together to create interactive audio effects.

Follow these steps to make a sprite play a sound when someone clicks it.
when this sprite clicked.
start sound [sound name] beneath the event block.
You can add background music, character sounds, interactive buttons, musical instruments, and sound effects triggered by events in your game. Combining Sound blocks with Events, Sensing, and Control blocks makes your projects more responsive and engaging.
play sound until done when the next action
should wait for the sound to finish. Use
start sound when the script should continue
immediately while the sound plays.
Audio Best Practices:
Sound blocks help make Scratch projects more engaging by adding music, feedback, and interactive audio effects. Choose sounds that suit your project’s purpose, adjust volume levels so audio remains comfortable to hear, and avoid playing too many sounds at once. For music projects, experiment with notes, instruments, and tempo to create original compositions. Test your project with its sounds enabled and make sure important instructions are still easy to follow.
Sound blocks are crucial for creating immersive music players, interactive games, and engaging educational content.
Events blocks (colored yellow) are the starting points of your programs. They detect when something happens and trigger your code to run. Every Scratch project needs at least one event block to begin execution.
Program Starters:
Event blocks start scripts when a specific action or condition occurs. The when green flag clicked block starts a script when the project begins, while when space key pressed runs a script when the player presses the selected key. The when this sprite clicked block responds when someone clicks a sprite. These blocks are essential for starting animations, controlling characters, and creating interactive games.

Communication Events:
Broadcast blocks allow different sprites and scripts to communicate. The broadcast block sends a message that other scripts can respond to using when I receive. The broadcast and wait block sends a message and waits for the scripts triggered by that message to finish before continuing. These blocks are useful for coordinating game events, changing levels, and triggering animations across multiple sprites.

Sensor Events:
Some Event blocks start a script when a condition becomes true. For example, when loudness > 10 can trigger an action when the microphone’s detected loudness exceeds the selected threshold. The when timer > 10 block starts a script when the project timer passes the specified value. These blocks can help create sound-responsive activities and timed interactions.

Multi-Key Controls:
Keyboard events let players control a sprite using different keys. In this example, the arrow keys change the sprite’s x- and y-coordinates, allowing it to move left, right, up, and down. You can use this approach to create character controls for maze games, platformers, and other interactive projects.

Game State Management:
Broadcast messages can coordinate what happens when a game starts. In this example, clicking the green flag broadcasts a start game message. Another script responds by switching to the next backdrop and playing a cheering sound. This approach helps keep game-start actions organized across different sprites and scripts.

This script responds to the start game message by repeatedly moving a sprite. An if condition checks whether the sprite touches the edge, and the turn block changes its direction when it reaches the boundary. Combining Events with Control and Motion blocks lets you coordinate gameplay after a particular event occurs.

Interactive Storytelling:
Event blocks can also control interactive stories. Clicking a sprite broadcasts a chapter message, which triggers another script to change the character’s costume, display dialogue, and broadcast the next chapter message. This makes it possible to build stories that progress through scenes and character interactions.

Follow these steps to make a sprite respond when a player presses a key.
when space key pressed.
move 10 steps beneath the event block.
Event blocks can start animations, respond to keyboard input, trigger sound effects, coordinate multiple sprites, and move a story from one scene to another. Combining Events with Motion, Looks, Sound, and Control blocks makes your Scratch projects more interactive.
Advanced Event Patterns:
Event blocks are the foundation of interactive Scratch projects. They allow scripts to respond to user input, messages, and changing conditions. As you gain experience, combine events with Control blocks to coordinate actions, broadcast messages between sprites, and manage game states. These techniques help you build more responsive educational games, animations, and interactive stories.
Events are the backbone of interactive projects. Master them to create responsive educational games and engaging user experiences.
Control blocks (colored orange) determine the flow and logic of your programs. They create loops, make decisions, and control when different parts of your code run. These blocks are essential for creating intelligent, responsive programs.
Basic Loops:
Loop blocks repeat instructions in a Scratch project. The forever block repeats the instructions inside it continuously, while repeat 10 runs them a set number of times. The repeat until block continues running its instructions until a specified condition becomes true. Loops are useful for animations, character movement, and repeated actions in games.

Advanced Loops:
You can combine loops with Variables and timing blocks to repeat actions at regular intervals. In this example, the script changes the score by 1, waits for half a second, and repeats the sequence 10 times. This is useful for creating countdowns, timed scoring systems, and repeated game events.

The repeat until block is useful when an action should continue only until a condition is met. Here, the sprite keeps moving 2 steps until it touches the edge of the stage. You can replace the edge condition with another condition, such as touching an object, to create more interactive behavior.

Conditional Statements:
Complex Conditions
Game Loop Structure:
This script demonstrates how Control blocks manage a simple game. When the green flag is clicked, the game-running variable is set to true. The loop continues until the game-running condition becomes false. If the sprite touches the enemy, the script ends the game and displays a Game Over message. This pattern is useful for managing game states and stopping gameplay when a player loses.

Smart AI Behavior:
Control blocks can help create sprites that react to their surroundings. In this example, the sprite checks its distance from the player. If the player is within 100 units, the sprite points toward the player and moves closer. Otherwise, it moves slowly and turns by a random amount. This creates a simple chasing behavior for enemies and other game characters.

Animation Timing:
Timing blocks help control the speed of an animation. In this example, the script switches costumes, waits briefly, and repeats the sequence five times. The sprite then switches to a specified costume. Adjusting the wait duration changes how quickly the animation plays, making it easier to create smooth and understandable visual effects.

Follow these steps to make a sprite repeat an action a set number of times.
when green flag clicked.
repeat 10 beneath the event block.
move 10 steps inside the repeat block.
wait 0.5 seconds block
or change the repeat count to see how the behavior changes.
Control blocks are useful for repeating animations, checking conditions, managing game rules, and controlling when scripts stop. Combine them with Motion, Sensing, Operators, and Variables to create games, simulations, and interactive learning projects.
repeat when you know how many times an action
should run, forever when it should keep running,
and repeat until when it should stop after a
condition becomes true.
Control blocks are fundamental to creating complex games, interactive stories, and any project requiring decision-making or repetitive actions.
Sensing blocks (colored light blue) gather information from the environment, user input, and sprite interactions. They’re the “eyes and ears” of your programs, allowing sprites to respond intelligently to their surroundings.
User Input:
User input blocks help sprites respond to keyboard and mouse interactions. The key pressed? block checks whether a particular key is being pressed, while mouse down? detects whether the mouse button is held down. The mouse x and mouse y blocks report the pointer’s horizontal and vertical positions on the stage. These blocks are useful for interactive games, drawing projects, and mouse-controlled activities.

Microphone and Camera:
Sensing blocks can use microphone input and video sensing to make projects respond to the real world. The loudness reporter provides a value representing detected sound level, while video sensing can report motion detected by a camera. These features can support sound-responsive animations, movement-based activities, and interactive learning projects. Microphone and camera features may require permission and compatible hardware.

Collision Detection:
Collision detection blocks help a sprite determine whether it touches another object or a particular color. The touching? block checks contact with a sprite, the mouse pointer, or an edge. The touching color? block detects contact with a selected color, while color is touching color? checks whether one color on the sprite touches another color. These blocks are useful for detecting obstacles, collecting items, and creating collision-based game rules.

Distance and Direction:
The distance to block measures the distance between a sprite and a selected target, such as the mouse pointer or another sprite. You can use this value to make characters approach a player, react when something gets close, or maintain a minimum distance from an object. Combining distance sensing with Operators and Control blocks creates more responsive interactions.

Sprite Properties:
Sprite property reporters provide information about a sprite’s current state. The x position and y position reporters return its coordinates, direction reports the direction it faces, and size reports its current size. These values can be used in calculations, conditional checks, and animations that depend on a sprite’s position or appearance.

Time and System:
Time and system reporters provide information that a Scratch project can use to control events or display information. The timer reports the time elapsed since the timer was last reset, while current can report information such as the day of the week. The username reporter can provide the current Scratch user’s username when available. These blocks are useful for timed challenges, date-based activities, and personalized projects.

Mouse-Following Sprite:
This script makes a sprite follow the mouse pointer. Inside a forever loop, the sprite points toward the pointer and moves forward 3 steps repeatedly. This creates a simple mouse-following effect that can be adapted for cursor companions, interactive demonstrations, and beginner games.

Collision-Based Game Mechanics:
This example checks whether a sprite touches another sprite named Enemy. When a collision occurs, the script decreases the health variable by 1, displays an “Ouch” message, and glides the sprite toward the center of the stage. This pattern can be used to create damage systems, collision feedback, and simple player health mechanics.

Sound-Activated Animation:
This script changes a sprite’s appearance based on detected loudness. When the loudness value exceeds 30, the sprite switches to the Andie-d costume and increases its size. Otherwise, it switches to the baseball costume and returns to its normal size. This creates a simple sound-responsive animation that can react to clapping, music, or other detected sounds.

Boundary Detection:
Boundary detection keeps a sprite within a defined area of the stage. This script repeatedly checks the sprite’s x and y positions. If it moves beyond the specified limits, the script sets its position back to the corresponding boundary. This technique is useful for keeping characters on-screen and controlling movement in maze and arcade games.

Follow these steps to make a sprite detect when it touches another sprite.
when green flag clicked.
forever block beneath the event block.
if then block.
touching [Sprite2]? inside the condition.
Select the name of the sprite you want to detect.
say [Collision detected!] for 2 seconds.
Sensing blocks can detect mouse and keyboard input, collisions, distances, and other information about a project’s environment. Combine them with Control, Motion, and Operators blocks to build obstacle courses, interactive stories, sound-responsive animations, and games that react to player actions.
Sensing blocks are crucial for creating interactive experiences, responsive games, and projects that react to real-world input.
Operators blocks (colored green) perform mathematical calculations, string manipulations, and logical comparisons. They’re the computational engine that enables complex behaviors and intelligent decision-making in your projects.
Basic Math:
Basic mathematical Operators blocks let you perform calculations in Scratch. Use addition, subtraction, multiplication, and division to work with numbers. The mod block returns the remainder after division, which is useful for checking whether a number is even or odd, cycling through patterns, and creating repeating game mechanics.


Advanced Math:
Advanced math Operators blocks help you perform additional calculations. The round block rounds a number to the nearest whole number, while abs returns its absolute value. The floor and ceiling blocks round down and up, respectively. Blocks such as sqrt, sin, and cos are useful for more advanced calculations, including movement patterns and mathematical animations.

Random Numbers:
The pick random block generates a random number between two specified values. For example, choosing a random number between 1 and 10 can help determine a game reward, select a random question, or vary an enemy’s movement. Random values make games less predictable and allow you to create different experiences each time a project runs.

Text Manipulation:
String Operators blocks let you combine and examine text. The join block combines two text values, letter retrieves a character at a specified position, and length reports the number of characters in a text string. The contains block checks whether one text value includes another. These blocks are useful for displaying messages, processing names, and building text-based activities.

Comparison Operators:
Comparison Operators blocks compare two values and return a true-or-false result. The greater-than (>), less-than (<), and equals (=) blocks let your scripts check conditions. For example, you can test whether a player’s score exceeds 50 points or whether two values are equal before allowing the next action to run.

Boolean Logic:
Boolean Operators blocks combine or reverse logical conditions. The and block returns true when both conditions are true, while or returns true when at least one condition is true. The not block reverses a condition’s result. These operators are especially useful for game rules, eligibility checks, and decision-making scripts.

Score Calculation System:
This example calculates a final score using a starting score and a time bonus. The script sets the initial score to 100, calculates the bonus from the remaining time, and combines the values to produce a final score. The join block then combines the text “Final Score:” with the calculated result. This approach is useful for timed quizzes, arcade games, and scoring systems.

Intelligent Enemy AI:
Operators blocks help an enemy character make decisions based on game conditions. In this example, the script checks whether the player is within 100 units and whether the health value is greater than zero. If both conditions are true, the enemy points toward the player and moves closer. Otherwise, it turns by a random amount and moves forward. This creates a basic enemy behavior that can be expanded with additional rules.

Password Validation:
This example uses an Operators comparison to check whether the player’s answer matches a specified password. If the answer matches, the script displays “Access Granted” and broadcasts an unlock message. Otherwise, it displays “Access Denied.” This demonstrates how Operators, Sensing, and Control blocks can work together to create a simple password-checking activity.

Dynamic Difficulty Adjustment:
Dynamic difficulty adjustment changes game settings according to the player’s score. In this example, a score above 500 sets the enemy speed to 5 and the spawn rate to 1. A score above 200 uses moderate settings, while lower scores use easier settings. Operators compare the score against thresholds, and Control blocks determine which settings are applied. This approach helps make games more challenging as players progress.

Text Processing:
This example uses text Operators to process a player’s name. The script asks the player to enter a name and stores the response in a variable. If the name contains more than 10 characters, the script creates a shorter version using the letter and join blocks. It then displays a greeting using the resulting text. This technique is useful for personalized messages and text-based Scratch projects.

Follow these steps to create a simple program that checks whether a player has reached a target score.
when green flag clicked.
score and set it to 75.
if then block.
> block inside the condition and enter
score on one side and 50
on the other.
You reached the target!.
Operators blocks can calculate scores, generate random values, compare conditions, combine text, and control how characters behave. Combine them with Variables, Control, and Sensing blocks to build quizzes, scoring systems, interactive stories, and games with increasingly complex rules.
Operators are essential for creating calculator applications, complex game mechanics, and any project requiring mathematical calculations or logical decision-making.
Variables blocks (colored red/orange) store and manipulate data in your programs. They’re like containers that hold information you want to remember and use later, such as scores, player names, or game states.
Basic Variable Operations:
Variables blocks store and update information while a Scratch project runs. The set variable to block assigns a value, while change variable by increases or decreases its current value. The show variable and hide variable blocks control whether the variable’s value appears on the stage. These operations are useful for tracking scores, keeping count of lives, storing player names, and managing game states.

List Operations:
Variables blocks store and update information while a Scratch project runs. The set variable to block assigns a value, while change variable by increases or decreases its current value. The show variable and hide variable blocks control whether the variable’s value appears on the stage. These operations are useful for tracking scores, keeping count of lives, storing player names, and managing game states.

Global Variables:
A global variable in Scratch is available to all sprites in the project when you create it using the option for all sprites. This makes it useful for information that different characters need to access, such as the player’s score, remaining time, or game status. For example, one sprite can increase the score when a coin is collected while another sprite displays the current score.
Sprite-Only Variables:
A sprite-only variable is created for a single sprite. It is useful when a character needs to keep track of its own information, such as its health, speed, or number of items collected. For example, each enemy sprite can have its own health variable without changing the health value of other enemies.
Cloud Variables:
Cloud variables can store supported data on Scratch’s servers, allowing certain values to persist between sessions and be shared across project users. They have specific restrictions and are generally intended for supported numeric data. Cloud variables are useful for simple shared scores or other supported project data, but availability and usage depend on Scratch’s current account requirements and cloud-variable rules.
Game Score System:
This example uses variables to manage a simple game’s score and remaining lives. The score starts at 0, and the lives variable starts at 3. When the player touches a coin, the script increases the score by 10, plays a sound, and hides the coin. This demonstrates how Variables, Sensing, Control, Sound, and Looks blocks can work together to create a basic scoring system.

This script reduces the player’s lives when the player touches an enemy. It then checks whether the remaining lives have fallen below 1. If they have, the sprite displays a “Game Over” message and stops the project. This is a common pattern for tracking player health and ending a game when the player runs out of lives.

High Score Tracking:
A high score variable stores the best score achieved during a game session. This script compares the current score with the high score. If the current score is greater, it updates the high score variable and displays the new record. This comparison helps games recognize player achievements and encourage replayability.

Follow these steps to create a simple score counter that increases when a player collects an item.
score and select
For all sprites so other sprites can
access the same score.
when green flag clicked, followed by
set score to 0.
change score by 10.
Variables can store scores, health, timers, player choices, and game settings. Lists can store multiple related values, such as quiz questions or inventory items. Combine Variables with Operators, Sensing, and Control blocks to create games, quizzes, simulations, and interactive learning projects.
Variables are fundamental to creating persistent game experiences, user profiles, and any project that needs to remember information between interactions.
My Blocks (colored purple) allow you to create custom functions and procedures. They help organize your code, reduce repetition, and make complex projects more manageable. Think of them as your personal toolbox of reusable code snippets.
Basic Custom Block:
My Blocks in Scratch lets you create your own blocks to perform specific tasks. To make one, open the My Blocks category, select Make a Block, and enter a name. You can also add inputs to pass numbers, text, or true-or-false values into your custom block. Once created, define the actions it should perform and use the new block whenever you need those actions in your project. Custom blocks help organize scripts and reduce repeated code.

Simple Action Blocks:
Simple custom blocks group a series of actions under one meaningful name. In this example, the custom block draw square repeats a movement and turning sequence four times. Calling the block runs the sequence without requiring you to place all the individual Motion and Control blocks in the main script. This approach is useful for repeated actions such as drawing shapes, playing an animation, or resetting a character.

Blocks with Parameters:
Custom blocks can accept inputs, also called parameters, to make them more flexible. In this example, the polygon block accepts the number of sides and the length of each side. A repeat loop uses the sides input to determine how many times the sprite moves, while the turning angle is calculated by dividing 360 by the number of sides. Changing the inputs lets the same block draw different regular polygons without rebuilding the script.

Animation System:
This custom block demonstrates how to organize sprite animation logic. It accepts an animation name and a speed value. When the animation name matches “walk,” the script repeatedly switches costumes and waits for the specified duration between changes. This makes the animation reusable and easier to adjust. You can expand the block with additional conditions for animations such as running, jumping, or idle movement.


Game Physics:
Custom blocks can organize more complex behavior, such as a gravity simulation. In this example, the apply gravity block checks whether the sprite is touching the ground. When it is airborne, the script changes the velocity variable and updates the sprite’s vertical position. When the sprite touches the ground, the script resets its velocity and adjusts its position. This illustrates how My Blocks can group physics logic into a reusable procedure.


Custom blocks divide a large project into smaller, clearly named tasks. Instead of keeping every instruction in one long script, you can group related actions into blocks such as draw polygon, animate sprite, or apply gravity. This makes scripts easier to read, test, and maintain.
Once you define a custom block, you can call it from multiple scripts belonging to the same sprite. For example, a drawing block can be reused whenever your project needs to draw a shape. Adding parameters makes the same block useful with different inputs.
Modular programming means dividing a project into smaller parts that each perform a specific job. Custom blocks support this approach by keeping tasks separate. You can improve the movement logic, for example, without having to rewrite an unrelated scoring or animation script.
Designing custom blocks encourages you to give tasks meaningful names, identify repeated code, and plan how different parts of a project work together. These habits also help when learning functions and procedures in other programming languages.
Follow these steps to create a custom block that draws a square.
draw square and confirm the
dialog.
define draw square block,
add a Control block:
repeat 4.
move 100 steps.
turn 90 degrees.
draw square beneath
when green flag clicked.
Use My Blocks when a sequence of instructions needs to be repeated, when a script is becoming difficult to understand, or when you want to group a complicated task under one name. Adding inputs lets you reuse the same procedure with different values, such as different polygon sizes or animation speeds.
draw square or apply gravity.
If the same sequence appears repeatedly in your scripts,
consider turning it into a custom block.
Custom blocks are essential for creating complex games, maintaining large projects, and developing good programming habits that transfer to other languages.
Scratch extensions add specialized blocks for tasks such as drawing, text-to-speech, video sensing, music, and hardware interaction. They expand what you can create beyond the core Scratch block categories, making projects more interactive and useful for learning programming, robotics, and creative computing.
Each extension introduces blocks for a particular purpose. The best extension to choose depends on what you want your project to do.
Create melodies and rhythms using musical notes, instruments, and tempo controls. This extension is useful for music projects, rhythm games, and interactive compositions.
Make sprites draw lines and shapes as they move across the Stage. Use pen controls to create geometric patterns, digital artwork, and drawing games.
Use a camera’s video feed to detect motion and respond to movement. It can support interactive activities in which a player’s movement affects what happens on screen.
Make a project speak text aloud using a selected voice. This can be useful for talking characters, narrated stories, and educational activities.
Translate text into another supported language. It can help you create multilingual stories, language learning activities, and projects for different audiences.
Connect compatible micro:bit hardware to Scratch to explore inputs, outputs, and physical computing. Projects can combine on-screen sprites with supported device features.
Supported LEGO hardware extensions let you create programs that interact with compatible motors, sensors, and devices. Availability depends on the LEGO product and Scratch-compatible setup.
Extensions can help learners connect programming concepts to practical activities. For example, the Pen extension introduces drawing through coordinates and movement, while compatible hardware extensions let students explore how software can interact with physical devices.
| Extension | What You Can Learn | Project Idea |
|---|---|---|
| Pen | Coordinates, movement, patterns, and repetition | Draw a geometric design |
| Music | Sequences, timing, rhythm, and patterns | Create a short melody |
| Text-to-Speech | Events, text, and interactive feedback | Build a talking character |
| Video Sensing | Input, detection, and event-driven responses | Create a motion-controlled game |
| micro:bit | Hardware input, output, and physical computing | Build a device-responsive activity |
| LEGO hardware | Robotics, sensors, motors, and control | Program a compatible robot |
Decide what you want your project to accomplish before selecting an extension. A drawing activity may need Pen, while a spoken story may benefit from Text-to-Speech. Choosing only the features you need helps keep scripts manageable.
Choose one extension and build a small project around it. For example, use Pen to draw a square, Music to play a repeating rhythm, or Text-to-Speech to make a sprite introduce itself when the green flag is clicked. Once the basic project works, add Events, Control, and other core blocks to make it more interactive.
Scratch extensions make it possible to explore creative coding, music, visual interaction, and physical computing. By choosing an extension that matches your goals and combining it with the core block categories, you can build richer projects while developing practical programming skills.
Mastering Scratch blocks isn’t just about knowing what each block does – it’s about using them efficiently and creating maintainable, professional-quality projects.
Script Structure:
Clean Code Example:

Efficient Block Usage:
Variable Names:
Custom Block Names:
Common Mistakes to Avoid:
Script Running Too Slowly:
Symptoms: Laggy movement, delayed responses, low frame rate
Common Causes:
Solutions:
// Bad: No wait block
forever
move (1) steps
end
// Good: Includes wait
forever
move (1) steps
wait (0.03) seconds
end
// Better: Optimized movement
forever
move (3) steps
wait (0.1) seconds
endMemory Issues:
Symptoms: Project becomes unresponsive, sprites disappear, sounds stop working
Solutions:


Variables Not Updating Correctly:
Common Issues:
Debugging Technique:
// Add temporary display blocks
when flag clicked
forever
say (join [Score: ] (score)) for (0.1) seconds
// Your other code here
endCollision Detection Not Working:
Troubleshooting Steps:

Broadcasts Not Received:
Check These Issues:
Debug Pattern:

Event Blocks Not Triggering:
Common Causes:
Sounds Not Playing:
Troubleshooting:

Check:
Sprites Not Appearing:
Common Issues:
Quick Fixes:

Systematic Debugging Process:
Remember, debugging is a normal part of programming. Even professional developers spend significant time troubleshooting their code!
Congratulations! You’ve now explored all 10 types of blocks in Scratch and learned how they work together to create amazing interactive projects. This comprehensive knowledge forms the foundation for unlimited creative possibilities in visual programming.
🎯 Key Concepts You’ve Mastered:
🚀 Your Next Steps in Scratch Programming:
💡 Professional Development Path:
Understanding Scratch blocks isn’t just about creating fun projects – you’re developing computational thinking skills that are valuable in many STEM careers. The logical thinking, problem-solving approaches, and systematic debugging techniques you’ve learned apply to all forms of programming and technology work.
🎮 Project Ideas to Apply Your Knowledge:
🌟 Remember This:
Every expert programmer started with the basics. Your understanding of Scratch blocks gives you a solid foundation in programming concepts that transfer to any language or platform. Whether you pursue game development, web design, robotics, or AI, these fundamental skills will serve you well throughout your journey.
The most important lesson? Programming is creative problem-solving with infinite possibilities. Now that you understand the building blocks, the only limit is your imagination!
Ready to Start Building? Open Scratch right now and experiment with different block combinations. Try recreating some of the examples from this guide, then modify them to create something uniquely yours. The best way to master blocks is through hands-on practice and experimentation.
Want More Coding Adventures? Explore our comprehensive collection of interactive coding projects for kids and discover new ways to apply your Scratch block knowledge. The journey from beginner to expert starts with a single block! 🎨✨
Last Updated: January 2025 | Author: Certified Scratch Educator with 15+ years of experience teaching visual programming to students worldwide. Specializing in computational thinking, game design, and STEM education.
Want your child to go further? Explore ItsMyBot’s Little Coder — structured coding courses designed for kids!

Online coding, AI, and robotics classes that help kids ages 5–16 build real skills — and confidence — one project at a time.
No commitment · Live class with an expert teacher
© ItsMyBot 2026. All Rights Reserved.