# Sprite movement

**URL:** https://forum.makecode.com/t/sprite-movement/34580
**Category:** Arcade
**Tags:** game
**Created:** [March 14, 2025, 5:12pm UTC](https://forum.makecode.com/t/sprite-movement/34580 "2025-03-14T17:12:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lennstrs](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@lennstrs](https://forum.makecode.com/u/lennstrs)
#### Post date: [March 14, 2025, 5:12pm UTC](https://forum.makecode.com/t/sprite-movement/34580/1 "2025-03-14T17:12:38Z")

</div>

Student created this code. When switching from level 1 to level 2 the sprite(player) appears to be floating and has lost basic movements. Here is their code. I also have another students that this is happening to… I have not seen this before  
[https://makecode.com/\_R5pEDtLPrJ3h](https://makecode.com/_R5pEDtLPrJ3h)

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [March 15, 2025, 6:12pm UTC](https://forum.makecode.com/t/sprite-movement/34580/2 "2025-03-15T18:12:14Z")

</div>

Hello! It looks like the issue the student has is with this block of code right here:

 ![IMG_7911](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/4/4/445d02452eaa991e67e4ff23f921faaf2e5249ea.jpeg)  
Whenever these conditions are met, the current level being 1 and the score being 1, the level 2 function is called every game update. This repeatedly returns the player position to the start of the level. To fix this, an easy solution would be to increase the current level variable to 2 after you enter the level, like this:  
 ![IMG_7912](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/6/6/6680f7679d5c6b4b7d78a8c1bb1fabe6170f2da9.jpeg)  
Hope this helps!
