New! Explore our Programming Academy and AI Tutor - learn to code from scratch, free to start. Explore Now
Programming Scratch Events and Repeat Loops

Events and Repeat Loops

🧩 Scratch

Start projects with events and loop blocks with repeat and forever.

Lesson 3 of 4 Tutorial
0/4 completed

Events Kick Everything Off

The Events palette starts your scripts. The green flag block when ▼ clicked is the most common start.

when ▼ clicked · when space key pressed · when sprite clicked · when I receive message

Loops Repeat Blocks

The Control palette has the loops:

  • repeat 10 — run a fixed number of times
  • forever — keep running until stopped
  • wait 1 seconds — pause between actions
Dancing sprite:
when ▼ clickedforevermove 10 stepsif on edge, bouncewait 0.2 seconds

Sending Messages

Use broadcast hello to trigger other sprites. A sprite with when I receive hello will react. This is how you coordinate scenes and characters!

Challenge

Build a bouncing ball: green flag → forever → move 10 steps → if on edge, bounce → wait 0.1 seconds.

Lesson Nav

Lesson sections