All Activities

Use scratch to create a custom block

Use scratch to create a custom block
Green highlight

Use Scratch to design and build a custom block (my block), add parameters, test it in projects, and reuse it to simplify code.

Orange shooting star
Background blob
Challenge Image
Skill Badge
Table of contents

Step-by-step guide to create a custom block in Scratch

0:00/0:00

Here at SafeTube, we're on a mission to create a safer and more delightful internet. 😊

Makeblock: A Quick Introduction To Their Educational Kits

What you need
Scratch account or access to scratch, a sprite to use, a short idea for what your custom block will do

Step 1

Open Scratch and create a new project so you have a fresh area to build in.

Step 2

Choose or paint a sprite to be the one that uses your custom block.

Step 3

Click the My Blocks category and then click Make a Block to start a new custom block.

Step 4

Type my block as the block name in the Make a Block dialog.

Step 5

Click the + button in the dialog to add at least one input parameter and give it a short name like n or color.

Step 6

Click OK to create the block and open the define my block area where you will add code.

Step 7

Drag the code blocks you want the custom block to do into the define my block area.

Step 8

Insert the parameter reporter into the define code wherever the value should change the block’s behavior.

Step 9

Drag the my block reporter into the Scripts area and set the parameter value to a test value.

Step 10

Click the green flag or run the script to test how my block works with your test value.

Step 11

Drag my block into other parts of your project where you had repeated code to simplify your scripts.

Step 12

Save your Scratch project to keep your new custom block and changes.

Step 13

Share your finished creation on DIY.org

Help!?

What can I use if I can't access Scratch online or the Make a Block feature?

If you can't access the online editor or the 'Make a Block' button, install the Scratch 3.0 offline editor or simulate a custom block by creating a helper sprite that runs the repeated code when it receives a broadcast message, and upload an image from your computer instead of using the Paint Editor for the 'Choose or paint a sprite' step.

My custom block doesn't seem to do anything when I click the green flag—what should I check?

Check that you actually dragged code into the 'define my block' area, that you placed the 'my block' reporter into the Scripts area with a test parameter value, and that the script calling 'my block' is connected to a start block like the green flag or another event.

How can I adapt this custom block activity for different ages?

For younger kids use a single simple parameter like 'n' and let them drag basic motion or looks blocks into 'define my block', for middle grades add a color or number parameter and testing step, and for older kids require multiple parameters, loops, broadcasts or cloning inside 'define my block' and have them save and share the project on DIY.org.

How can we extend or personalize our custom block after making it?

Extend it by adding extra input parameters (for color, speed, or count), changing the sprite's costumes or adding sound blocks inside the 'define my block' code, reusing the custom block across multiple sprites to simplify scripts, and then save and share the finished project on DIY.org.

Watch videos on how to create a custom block in Scratch

0:00/0:00

Here at SafeTube, we're on a mission to create a safer and more delightful internet. 😊

Building Blocks Game for Kids | Make a Sandcastle! | CBeebies Get Creative App

4 Videos
Building Blocks Game for Kids | Make a Sandcastle! | CBeebies Get Creative App

Building Blocks Game for Kids | Make a Sandcastle! | CBeebies Get Creative App

PROGRAMMING for kids šŸ‘¦ Block Programming šŸ’» Part 2

PROGRAMMING for kids šŸ‘¦ Block Programming šŸ’» Part 2

How to Make a Simple Animation in Scratch | Scratch Tutorial

How to Make a Simple Animation in Scratch | Scratch Tutorial

Introducing Scratch Garden!

Introducing Scratch Garden!

Facts about block-based programming for kids

šŸš€ Scratch has been used by millions of young creators worldwide to make games, stories, and animations.

🧩 Custom blocks (My Blocks) let you bundle repeatable code into a single reusable block—like making your own LEGO piece.

🧠 Parameters let a custom block accept inputs so the same block can do different jobs with different values.

šŸŒ Scratch is available in more than 70 languages, so kids around the world can learn coding in their own tongue.

šŸ” Reusing custom blocks reduces duplicated code, makes projects shorter, and makes bugs easier to fix.

How do I create a custom block (My Block) in Scratch and use it in a project?

Open your Scratch project, select a sprite, then open the ā€œMy Blocksā€ (or ā€œMore Blocksā€) category and click ā€œMake a Block.ā€ Name it, add parameters (inputs) in the dialog, then build the block’s definition using the generated ā€œdefineā€ block. Call your custom block from scripts to run the packed steps. Test by running the project, tweak the definition as needed, and use calls to simplify repeated code.

What materials and tools do I need to make a custom block in Scratch?

You need a computer, Chromebook, or tablet that runs Scratch (online at scratch.mit.edu or the offline editor), a mouse or touch input, and an internet connection for the online editor. A free Scratch account helps save projects. Optionally, a notepad for planning and adult supervision for younger children. No special hardware or paid software is required.

What ages is creating custom blocks in Scratch suitable for?

Creating custom blocks is generally suitable for children aged about 8 and up, when they can read and follow multi-step logic. Younger kids (5–7) can try this with hands-on adult guidance. Older children and teens benefit from custom blocks for learning abstraction and organizing larger projects. Adjust complexity and supervision to the child’s experience and attention span.

What are the benefits of using custom blocks in Scratch projects?

Custom blocks teach abstraction and reduce repeated code, making projects easier to read and debug. Parameters let kids experiment with inputs, building early function and variable concepts. Reuse of blocks speeds development, supports teamwork, and helps structure larger projects. Overall, making custom blocks strengthens computational thinking, problem decomposition, and neat project organization.

Ready to create?

Make

To create a safe space for kid creators worldwide!

Create

Vibe Coding

Kids GPT

All Tools

Kibu

Learn

Worksheets

Courses

Skills

Resources

SafeTube

Blog

FAQ

Pricing

Account

Log-in

Sign-up

Data Deletion

Company

About

Community Guidelines

Privacy Policy

Terms of Service

2025, URSOR LIMITED. All rights reserved. DIY is in no way affiliated with Minecraftā„¢, Mojang, Microsoft, Robloxā„¢ or YouTube. LEGOĀ® is a trademark of the LEGOĀ® Group which does not sponsor, endorse or authorize this website or event. Made with love in San Francisco.