# Find x and y from sprite while game is playing

**URL:** <https://forum.makecode.com/t/find-x-and-y-from-sprite-while-game-is-playing/40538>\
**Category:** Help\
**Created:** [November 18, 2025, 5:49pm UTC](https://forum.makecode.com/t/find-x-and-y-from-sprite-while-game-is-playing/40538 "2025-11-18T17:49:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dlee](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@Dlee](https://forum.makecode.com/u/Dlee)\
**Post date:** [November 18, 2025, 5:49pm UTC](https://forum.makecode.com/t/find-x-and-y-from-sprite-while-game-is-playing/40538/1 "2025-11-18T17:49:32Z")

</div>

> **[Arrow Mainia](https://arcade.makecode.com/17933-16116-34282-06102)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Iro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/iro/32/34749_2.png) [@Iro](https://forum.makecode.com/u/Iro)\
**Post date:** [November 18, 2025, 7:31pm UTC](https://forum.makecode.com/t/find-x-and-y-from-sprite-while-game-is-playing/40538/2 "2025-11-18T19:31:26Z")

</div>

Just make two variables for the tracking sprite x and y, then use a forever block to set those variables to the sprites x and y. example:

 ![Screenshot 2025-11-18 1.02.25 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/a/2/a25cb9f91e3b3ad98c1fad5cc581c8ede8941d91.png)

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [November 18, 2025, 8:59pm UTC](https://forum.makecode.com/t/find-x-and-y-from-sprite-while-game-is-playing/40538/3 "2025-11-18T20:59:42Z")

</div>

You know you can use the round blocks by themselves
