mouse y — Scratch Block Guide
Returns the mouse cursor’s current vertical coordinate (-180 to 180).
What this block does
Returns the mouse cursor’s current vertical coordinate (-180 to 180).
Control vertical Pong paddles or height-based aiming.
- Category: Sensing Blocks
- Key tip: Combine mouse x and mouse y for custom cursor tracking.
Working Scratch example
Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.
- When green flag clicked
- Forever
- Set y to mouse y
Try it: Moves the sprite smoothly up and down with the cursor.
Related block guides
Explore other blocks in the same category or return to the full English Block Dictionary.
FAQ
When should I use "mouse y" in Scratch?
Control vertical Pong paddles or height-based aiming. Combine mouse x and mouse y for custom cursor tracking.
This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.