When () Clicked
When clicked
Category Control
Type Hat

The When () Clicked block is a Control Block and a Hat Block. This block allows the user to make a script which will only activate when the selected sprite is clicked. The block will run the script every time the sprite is clicked instead of the first time.

Common UsesEdit

Some common uses for this block are:

  • Buttons/Options for menus
  • Scratch OSs
  • Tutorials (clicking a button to move on)

Below are two scripting examples:

When clicked example

This script will ask for input from a user when the sprite has been clicked.

Example Menu button script

The sprite that holds this script will shrink and grow (imitating a button), before making a broadcast.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.