# Hey I need help with a bug in my game

**URL:** <https://forum.makecode.com/t/hey-i-need-help-with-a-bug-in-my-game/36841>\
**Category:** Help\
**Created:** [May 21, 2025, 10:39pm UTC](https://forum.makecode.com/t/hey-i-need-help-with-a-bug-in-my-game/36841 "2025-05-21T22:39:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukiechu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lukiechu/32/17352_2.png) [@Lukiechu](https://forum.makecode.com/u/Lukiechu)\
**Post date:** [May 21, 2025, 10:39pm UTC](https://forum.makecode.com/t/hey-i-need-help-with-a-bug-in-my-game/36841/1 "2025-05-21T22:39:21Z")

</div>

> **[Pacman? (Beta 1.1) (dev version)](https://arcade.makecode.com/S10219-70170-23076-85210)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

the bug is where if you go through the platform on level 5 (you can go to any of the levels easily with the number keys) and walk over to the edge of the map you go outside of the tilemap and either the sprite gets destroyed or something weird happens to it

---

<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:** [May 22, 2025, 1:27am UTC](https://forum.makecode.com/t/hey-i-need-help-with-a-bug-in-my-game/36841/2 "2025-05-22T01:27:17Z")

</div>

Your issue stems from the fact that the outside of tilemaps are just walls, so by turning on “ghost through walls” that allows the sprite to go outside the tilemap. Instead, you could turn off and on the walls of those specific tiles, like this:

 ![IMG_8856](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/8/b/8b1d48c86744afec82549fc7ea56306a9a1f6f23.jpeg)  
You might need to increase the time before the switch back, as I did see some glitchy behavior. Maybe a better way would be to check if the player is not touching any of those tiles, but there isn’t really a specific block for that, so it would take more work.

---

<div class="post-metadata">

**Author:** ![Lukiechu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lukiechu/32/17352_2.png) [@Lukiechu](https://forum.makecode.com/u/Lukiechu)\
**Post date:** [May 27, 2025, 3:57am UTC](https://forum.makecode.com/t/hey-i-need-help-with-a-bug-in-my-game/36841/3 "2025-05-27T03:57:27Z")

</div>

thanks for the help it works great =D
