How to Make Fireworks in Scratch | Beginner Scratch Tutorial

Create a graphic fireworks show in Scratch with me as a fun artistic project, or to even celebrate the 4th of July! Use loops and random numbers to launch colorful fireworks into the night sky.

Who is this for?

  • Language: Scratch
  • Juni Level: Scratch Level 1
  • Ages: 8-11
  • Coding experience: Beginner, or familiar with basic concepts
  • Difficulty Level: Easy, but every student is different!

Learning Outcomes

Core concepts usedThings to know beforehand
LoopsGeneral familiarity with “Looks” blocks (i.e. set size, set color effect, hide/show, etc)
Random numbers

Project Demo

Click the Green Flag to see the Scratch Fireworks show in action below. You can also view my project solution code if you get stuck.https://scratch.mit.edu/projects/409030161/embed

What to look out for:

  • There are actually multiple firework sprites all doing the same thing, but starting at slightly different times!
  • The firework waits a little before it appears.
  • When it appears, it’s always in a random place, with a random size, and a random color, and it makes a sound.
  • When it’s done making a sound, it disappears again.
  • This repeats over and over, forever!

General Steps to Build the Project

  1. Get your sprites & sounds ready.
  2. Make our firework wait and then appear in a random place with a random size and a random color, and make a sound.
  3. Make our firework do this over and over again forever.
  4. Make more fireworks, and make them all start at different times!

Step-by-Step Tutorial

Step 1: Get your sprites & sounds ready.

  • Either use my template or find your own pictures and sounds!

Step 2: Make our firework wait and then appear in a random place with a random size and a random color and make a sound.

  • First, make the firework hide when the flag is pressed, wait a little bit, and then show.
  • Add a block so that before it shows, it goes to a random position.
  • Add a block so that before it shows, it becomes a random size.
  • Add a block so that before it shows, it becomes a random color.
  • Add a block so that it makes a sound when it shows!

Step 3: Make our firework do this over and over again forever.

  • Use a forever block, and put it around all of the code we wrote!

Step 4: Make more fireworks, and make them all start at different times!

  • Duplicate your sprite.
  • For each copy, before it starts looping forever, make it hide and wait a little bit. This way it will start at a different time from the other sprite!

Great job! Want to keep learning?

We hope you enjoyed building Maya’s project! To keep practicing or learning, check out more of our coding tutorials on our blog.

Need help?

A Juni instructor teaching Python

A Juni Instructor teaches basic Python to a young student.

Looking up your coding questions is one of the best ways to learn!

Another great way to learn is from an experienced coder or instructor. Juni Learning CS Instructors like Maya work closely with students ages 8-18, and are specially trained to adapt to each child’s unique learning style, pace, and interests.

We teach a variety of coding courses including Scratch, Python, Java, Web Development, AP Computer Science, and USACO. Read more about coding for kids and our curriculum, or speak with a Juni Advisor by calling (650) 263-4306 or emailing advisors@learnwithjuni.com to learn which course is best for your child’s coding journey.


Maya Nigrin is pursuing a B.S. in Computer Science at MIT. She is currently a senior instructor at Juni Learning, teaching Python, Java, Scratch, web development, and USACO. She’s interned with companies like Vivint Smart Home and Microsoft, and this summer, she will be interning at Klaviyo as a software engineer. In her free time, Maya also enjoys painting and playing, writing, and listening to music.

You may also like...

Go further with Juni

Find your potential through our exclusive educational content, guides, and resources only available to Juni Subscribers.

Recent Posts

Looking for a Juni Course?
Check out our Course Explorer

Dad and son

Get fun activities sent straight to your inbox

Enjoyed this article? Become a Juni subscriber to get even more exclusive educational content, guides, and deals sent straight to your email inbox.

Discover more from Juni Learning

Subscribe now to keep reading and get access to the full archive.

Continue reading