Mouse Input — Click and Follow
Scratch can detect the mouse position and mouse clicks.
Key Sensing Blocks
- mouse x / mouse y — the current coordinates of the mouse pointer.
- mouse down? — true when the mouse button is held down.
- touching (mouse-pointer)? — true when the sprite is under the cursor.
Example: Sprite Follows Mouse
When 🏁 clicked → forever → go to x:(mouse x) y:(mouse y)
The sprite teleports to your cursor every frame — try glide instead for a smoother follow effect.