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

Start learning →

y position — Scratch Block Guide

📌 What you will learn

Reporter block that returns the sprite’s current vertical coordinate (-180 to 180).

What this block does

Reporter block that returns the sprite’s current vertical coordinate (-180 to 180).

Detect pits, ceiling hits, or when falling clones reach the bottom.

  • Category: Motion Blocks
  • Key tip: Useful for sorting layer order or triggering altitude-based events.

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 y position
  1. When green flag clicked
  2. Forever
  3. If <y position (-160) then
  4. Go to x: 0 y: 160

Try it: Wraps a falling sprite back to the top when it nears the bottom edge.

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 "y position" in Scratch?

Detect pits, ceiling hits, or when falling clones reach the bottom. Useful for sorting layer order or triggering altitude-based events.

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