NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

x position — Scratch Block Guide

📌 What you will learn

Reporter block that returns the sprite’s current horizontal coordinate (-240 to 240).

What this block does

Reporter block that returns the sprite’s current horizontal coordinate (-240 to 240).

Check whether a player crossed a finish line or left the screen.

  • Category: Motion Blocks
  • Key tip: Check the checkbox next to "x position" in the palette to monitor it live on stage.

Working Scratch example

Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.

Example using x position
  1. When green flag clicked
  2. Forever
  3. If (x position) 200> then
  4. Say Goal reached!

Try it: Displays a message as soon as the sprite passes x = 200.

Related block guides

Explore other blocks in the same category or return to the full English Block Dictionary.

Back to Motion Blocks See the overview and patterns for Motion Blocks. Learn more → Scratch Block Dictionary (All Categories) Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Learn more →

FAQ

When should I use "x position" in Scratch?

Check whether a player crossed a finish line or left the screen. Check the checkbox next to "x position" in the palette to monitor it live on stage.

This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.