Scratch 01 · Make your first animation

A fox sprite moves along an arrow with a speech bubble.

Scratch lesson 1 of 10 · Beginner · About 20 minutes

Send an explorer across the stage to deliver a message. Learn how to join blocks, start with the green flag and make a character speak and move in order.

What you’ll make Build an animation that starts in the same spot each time, makes your character speak, then carries them across the stage to deliver a message.

Get ready

Open the Scratch editor (opens in a new tab) and start a new project.

  • Open Scratch, choose Create and give your project a title such as The Message Run.
  • Keep the starting sprite or choose a new one. A sprite is a character or object you can give instructions to. In the sprite panel below the stage, rename your character Explorer.
  • Select Explorer in the sprite list. Check that the Code tab is active. Any blocks you add now belong to Explorer.

To keep your project, choose File → Save to your computer in Scratch.

Green flag. Set a starting point. → Sprite speaks. Show a speech bubble. → Sprite moves. Travel to a new spot.
Project flow · Green flag → Sprite speaks → Sprite moves

Build it in Scratch

Choose the sprite named above each stack. The colours help you find the block categories. Indented rows sit inside the block above. Follow the end marker to see where each loop or condition closes.

1. Give Explorer a starting point

Find when green flag clicked in Events and put it in the coding area. Snap the Motion block go to x: () y: () underneath. Type -160 for x and -55 for y. Click the green flag above the stage. The x number moves Explorer left or right and the y number moves Explorer down or up. A negative x puts Explorer to the left of the centre, ready to start.

Block stack for Explorer
when green flag clicked
go to x: (-160) y: (-55)

2. Add the opening line

Find the purple Looks block say [] for () seconds. Snap it under the starting position block. Type I have a message! in the text box and leave the time at 2. Click the green flag and look for the speech bubble. This version of the block holds the bubble on screen for two seconds, then lets the next instruction run.

Block stack for Explorer
when green flag clicked
go to x: (-160) y: (-55)
say [I have a message!] for (2) seconds

3. Glide across and deliver the message

Under the opening line, add the blue Motion block that glides to x and y. Set the time to 2, x to 145 and y to -55. The two x values sit on opposite sides of the stage. The y values are the same, so the route is level. Finish the same stack with another timed speech bubble. Choose your own message or use Special delivery!.

Block stack for Explorer
when green flag clicked
go to x: (-160) y: (-55)
say [I have a message!] for (2) seconds
glide (2) secs to x: (145) y: (-55)
say [Special delivery!] for (2) seconds

Test your project

  1. Click the green flag and call out what happens in order. Explorer starts on the left, speaks, glides right and speaks again.
  2. When Explorer finishes on the right, click the flag again. Explorer should jump back to the left before speaking. That is the starting position block doing its job.
  3. Change the glide from 2 seconds to 4 seconds and run again. The destination stays the same. Only the time it takes to get there changes.

If something goes wrong

Explorer stops after the first line.
Look for a gap under the first speech block. Drag the glide block up until it snaps onto that stack, then retest.
Explorer moves diagonally or in the wrong direction.
Make both y boxes -55, then check that the starting x is -160 and the glide destination x is 145. Keep the minus sign on the starting value.
Clicking the flag does nothing.
Select Explorer, check that the yellow green-flag event sits at the top, and make sure your blocks are all attached beneath it.

Make it your own

  • Change the final y to 60. Predict the new route before you run it.
  • Add a second glide after the delivery message to send Explorer home. Choose the original x and y values as the destination.

What you’ve learned A sequence is a list of instructions in order. A green-flag event starts your sequence, and a starting position makes it repeatable.