# Fix: Player Gets Stuck Inside Walls > Separate X and Y axis movement and undo only the axis that caused the collision. Fix: Player Gets Stuck Inside Walls in Scratch 3.0. Separate X and Y axis movement and undo only the axis that caused the collision. Fast diagnostic checklist and prevention tips. ## Root cause & fastest fix Separate X and Y axis movement and undo only the axis that caused the collision. Before rewriting your project, save a quick .sb3 backup and verify this single cause in isolation. - Check green-flag initialization (position, show, size, variables). - Display relevant variables on stage to observe exact values when the bug happens. - Test clicking the green flag twice in a row after applying the fix. ## More Scratch troubleshooting guides Explore our full troubleshooting library and coding recipes. - [All 100 Scratch Bug Fixes](/en/fixes/): Search fixes by exact symptom. - [Troubleshooting Hub](/en/troubles/): Full diagnostic guides for movement, sound, clones, and devices. - [Scratch Block Dictionary](/en/dictionary/): Verify how each individual block behaves. Updated: 2026-11-24 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/fixes/sprite-stuck-in-wall/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)