# Sprite overlap issues

**URL:** <https://forum.makecode.com/t/sprite-overlap-issues/22948>\
**Category:** Help\
**Tags:** game\
**Created:** [October 2, 2023, 4:48pm UTC](https://forum.makecode.com/t/sprite-overlap-issues/22948 "2023-10-02T16:48:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaggyfoofoo1](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@chaggyfoofoo1](https://forum.makecode.com/u/chaggyfoofoo1)\
**Post date:** [October 2, 2023, 4:48pm UTC](https://forum.makecode.com/t/sprite-overlap-issues/22948/1 "2023-10-02T16:48:49Z")

</div>

I made a function where the enemy sprite follows the player and when it overlaps it’s supposed to destroy the player, but it doesn’t and I’ve tried everything I can think of but it doesn’t work.

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [October 3, 2023, 5:59pm UTC](https://forum.makecode.com/t/sprite-overlap-issues/22948/2 "2023-10-03T17:59:05Z")

</div>

Hi @chaggyfoofoo1,

Posting your code with this function here would help both anyone who are prepared to take a look and the feedback to this help request of yours.

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [October 4, 2023, 4:45pm UTC](https://forum.makecode.com/t/sprite-overlap-issues/22948/3 "2023-10-04T16:45:04Z")

</div>

Welcome, by the way, @chaggyfoofoo1!

I’d be happy to take a look at your code.
