# Melee help needed

**URL:** <https://forum.makecode.com/t/melee-help-needed/46594>\
**Category:** Help\
**Created:** [October 23, 2026, 3:00am UTC](https://forum.makecode.com/t/melee-help-needed/46594 "2026-10-23T03:00:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mik](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mik](https://forum.makecode.com/u/Mik)\
**Post date:** [October 23, 2026, 3:00am UTC](https://forum.makecode.com/t/melee-help-needed/46594/1 "2026-10-23T03:00:25Z")

</div>

Any way to make melee attacks in makecode? I really need help.

---

<div class="post-metadata">

**Author:** ![Soleb244](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Soleb244](https://forum.makecode.com/u/Soleb244)\
**Post date:** [October 23, 2026, 2:10pm UTC](https://forum.makecode.com/t/melee-help-needed/46594/2 "2026-10-23T14:10:58Z")

</div>

I’m adding melee combat to my game too, and I also had some trouble. I will tell you if I succeed

---

<div class="post-metadata">

**Author:** ![Sword\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sword_studios/32/36772_2.png) [@Sword\_Studios](https://forum.makecode.com/u/Sword_Studios)\
**Post date:** [October 23, 2026, 2:12pm UTC](https://forum.makecode.com/t/melee-help-needed/46594/3 "2026-10-23T14:12:04Z")

</div>

Depends on what you mean by melee attacks. Can you send the link to your project?

---

<div class="post-metadata">

**Author:** ![LazerTag2](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lazertag2/32/32715_2.png) [@LazerTag2](https://forum.makecode.com/u/LazerTag2)\
**Post date:** [October 24, 2026, 8:32pm UTC](https://forum.makecode.com/t/melee-help-needed/46594/4 "2026-10-24T20:32:14Z")

</div>

One way which is really common is to send an invisible projectile while animating the player. Another way is to set the projectile velocity to zero and set it to one position and animate the projectile. Hopefully this helps.

---

<div class="post-metadata">

**Author:** ![MeatballDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meatballdev/32/36786_2.png) [@MeatballDev](https://forum.makecode.com/u/MeatballDev)\
**Post date:** [October 26, 2026, 10:32pm UTC](https://forum.makecode.com/t/melee-help-needed/46594/5 "2026-10-26T22:32:33Z")

</div>

this is a very primative method but it gets the job done

when you press a (or whatever you want the attack button to be) you have a check to see if you are overlapping with the enemy and if you are you make it deal damage

---

<div class="post-metadata">

**Author:** ![PimIncGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/pimincgames/32/15040_2.png) [@PimIncGames](https://forum.makecode.com/u/PimIncGames)\
**Post date:** [October 28, 2026, 9:44pm UTC](https://forum.makecode.com/t/melee-help-needed/46594/6 "2026-10-28T21:44:52Z")

</div>

I mean I just usually do a animation and change some variables and just do overlap on that but that’s probably not the best solution.

---

<div class="post-metadata">

**Author:** ![Air](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/air/32/26413_2.png) [@Air](https://forum.makecode.com/u/Air)\
**Post date:** [October 29, 2026, 2:57am UTC](https://forum.makecode.com/t/melee-help-needed/46594/7 "2026-10-29T02:57:51Z")

</div>

that’s what I do, and decided not to post it here because it’s kind of janky, and there are much better ways to do it.
