There’s a way to make your Scratch game or project more immersive with just the addition of one or two sprites. A scrolling background is a fun and simple effect where sprites are used to create the illusion of movement and motion. It’s often combined with other effects to enrich a game or project and make it more visually appealing.

📌 [Download] Printable Scratch Coding Tutorials Get 2 printable Scratch tutorials, Rocket Landing and Flying Space Cat, to code your own games step by step. Download Now

In this article, I’ll show you how to make a scrolling background in Scratch. Just like in the real world, backgrounds and locations change as we move. We’ll try to recreate this with our Walk In The Park project. It’s a great effect to add to any project, so give it a try!

scrolling background complete scratch project

View and remix the Walk In The Park project now.

What you need:

No coding experience is necessary for this Scratch tutorial. Beginner-friendly for kids ages 8 and up.

How to Make a Scrolling Background in Scratch

Our project is comprised of three different parts: the walking cat, the floating cloud, and the rolling hills.

Step 1: Create a New Scratch Project

We always start in Scratch by creating a new project. 

create a scratch project
rename your scratch project and sprite

You’re ready to code!

Scrolling background step 1 gif

Hint: Name your project anything you want and click on the orange “Share” button to make it available for others to remix.

Step 2: Draw the Backdrop

The cat is walking in a basic setting with a blue sky and dirt path. We’ll create this scene as a backdrop.

paint a backdrop
use the rectangle to paint a background

In the preview screen, you will see your cat sprite and the background you drew. You can reposition your cat sprite around to fit your new scene. The backdrop itself will not move.

Once you’re finished designing your backdrop, we can animate the cat to take a stroll! 

Scrolling background step 2

Hint: You can draw more details in the background to fit your game or project.

Step 3: Animate the Cat Walking

The cat sprite stays in place on the path, but appears to be walking. We animate the cat by changing its costume from having its foot down to up, then repeating that process.

animate cat walking

This means that every 0.5 seconds, the cat’s costume will switch.

Press the green flag to test your code. It should look like your sprite is walking!

If it works, let’s move on to add a scrolling background. 

Scrolling background step 3 gif

Hint: See the different costumes in the “costumes” tab and add costumes to create your own walking effect.

Step 4: Draw the background sprites

We need to draw two sprites that will represent the hills in the background. These sprites will move across the screen to create the scrolling effect.

paint a scratch sprite
draw the hills

In order for our sprite to go off the screen as it moves, we will add a transparent box behind it that increases the width of our sprite.

draw transparent box

Now, create the second sprite.

duplicate hills1 sprite
rename hills2 sprite

In your preview screen, you can see both sprites. These two sprites are all you need to make a seamless scrolling background! 

Scrolling background step 4 gif

Hint: You can change the color of the “hills2” sprite so you can see how the effect is working in your preview screen. Later, change it back to match “hills1”.

Step 5: Animate Sprite 1 in the Hills Background

The hills sprites will move from right to left and then start that process again continuously like this:

how scrolling works in scratch

The “hills1” sprite starts in the center of the project. When we start the program, place it there.

go to block

Next, we want the sprite to move all the way to the left until it goes off the screen. 

Go to and glide to position background
loop the background movement

Click the green flag to see your “hills1” sprite moving to the left. Keep it up, only a few steps left! 

Scrolling background step 5 gif

Hint: Experiment with the timing and position of your sprite to fit your animation.

Step 6: Animate Sprite 2 in the Hills Background

The code for the second hills sprite will have the same format as the first sprite. However, the sprite will start at the right side of the screen and move to the center.

When we start the program, place “hills2” off to right side of the screen.

go to x y position

Now, we want the sprite to move to the left until it gets to the center where the “hills1” sprite started. 

glide to position

Click the green flag to see your hills moving to the left. Is everything working properly?

Scrolling background step 6 gif

Hint: If you are seeing a gap between your two sprites, increase or decrease the x position on the hills sprites.

Your scrolling background is complete! View and remix A Walk In The Park project.

A Walk in The Park Complete gif

This is just one way to create a scrolling background effect. You can test different designs, speeds, and timing to create a unique experience for your project or game. In the bonus steps, I will show you how to animate a cloud and add music to your project.

If you want to learn from the experts, join our top-rated Scratch classes for kids.

Bonus 1: Add and Animate a Cloud Sprite

Let’s create a scrolling background animation with only one sprite.

choose a spirte button
select the cloud sprite
add a transparent background

 Now, let’s add the code that moves the cloud.

forever go to and glide

Press the green flag to see your cloud floating in the sky. 

Scrolling background bonus 1 gif

Hint: Change the number of seconds in the glide block to make your cloud move faster or slower.

Bonus 2: Add music to your project

First, let’s select the music we want to add.

go to sounds tab

Now, let’s add the code that plays the music in the background.

play sound until done

Hit the green flag to listen to the song. What a nice atmosphere you’ve created by adding background music to your scene! 

Scrolling background bonus 2 gif

Hint: You can upload a music file or even record a song to play in the “Sounds” tab. 

Learn More Scratch Effects with Tutorials

There are so many possibilities in Scratch! You can learn to code different effects, like the scrolling background, through tutorials or join a Scratch class to learn from the experts. 

Try one of these fun beginner tutorials next.

Download Free Printable Scratch Coding Tutorials PDF

Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.

Try a Scratch Coding Class for Kids

Now you know how to make a scrolling background in Scratch! It’s simple and you can include it in any game or project you code to make it better.

Kids can also learn Scratch from the experts in our elementary school coding program. It’s designed to teach kids, ages 8-11, how to think like programmers while building fun, interactive projects. Students learn fundamental coding concepts in Scratch and then advance to text-based languages like JavaScript and Python. It’s the best way for kids to learn Scratch.

Explore our programs and join our top-rated Scratch classes for kids.