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

Start learning →

How to Move a Sprite Smoothly Left and Right in Scratch

📌 What you will learn

Check key presses inside a forever loop instead of using choppy hat-block repeats.

Minimal Working Block Recipe

Check key presses inside a forever loop instead of using choppy hat-block repeats.

Test this minimal version first, then tune numbers like speed, gravity, or timing to match your game feel.

Move a Sprite Smoothly Left and Right script
  1. forever
  2. if key [right arrow] pressed? then change x by 6
  3. if key [left arrow] pressed? then change x by -6

Try it: Immediate, lag-free movement while holding arrow keys.

Debugging Checklist & Next Steps

If it behaves unexpectedly, verify initial variable resets on the green flag and check that continuous checks sit inside a forever loop.

Related Deep-Dive Guide Explore full mechanics and variations. Learn more → All 120 Scratch How-To Recipes Return to the reverse lookup index. Learn more →

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