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

Start learning →

(x position) of (Sprite1) — Scratch Block Guide

📌 What you will learn

Reads another sprite’s coordinates, direction, costume, size, or local variable—or the Stage’s backdrop.

What this block does

Reads another sprite’s coordinates, direction, costume, size, or local variable—or the Stage’s backdrop.

Let an enemy check the player’s x position, or align a weapon sprite to the player.

  • Category: Sensing Blocks
  • Key tip: Always reads the original sprite’s values, not a specific clone’s.

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) of (Sprite1)
  1. When green flag clicked
  2. Forever
  3. Go to x: (x position of Player) y: ((y position of Player) + 30)

Try it: Floats a crown or HP bar 30 pixels above the Player sprite.

Related block guides

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

Back to Sensing Blocks See the overview and patterns for Sensing 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) of (Sprite1)" in Scratch?

Let an enemy check the player’s x position, or align a weapon sprite to the player. Always reads the original sprite’s values, not a specific clone’s.

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