# Multiplayer shooting

**URL:** <https://forum.makecode.com/t/multiplayer-shooting/8855>\
**Category:** Help\
**Created:** [June 21, 2021, 3:09pm UTC](https://forum.makecode.com/t/multiplayer-shooting/8855 "2021-06-21T15:09:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![helpmepls](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@helpmepls](https://forum.makecode.com/u/helpmepls)\
**Post date:** [June 21, 2021, 3:09pm UTC](https://forum.makecode.com/t/multiplayer-shooting/8855/1 "2021-06-21T15:09:45Z")

</div>

> **[Multiplayer thingo](https://arcade.makecode.com/51761-80499-13771-22761)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I am trying to make a 1v1 multiplayer, but can’t seem to make the projectiles do anything when they hit the opponent; it just says error. Does anyone know how to fix this?

---

<div class="post-metadata">

**Author:** ![biscuit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/biscuit/32/4404_2.png) [@biscuit](https://forum.makecode.com/u/biscuit)\
**Post date:** [June 21, 2021, 5:41pm UTC](https://forum.makecode.com/t/multiplayer-shooting/8855/2 "2021-06-21T17:41:35Z")

</div>

I think the reason that it isn’t doing anything is because you don’t have any code for what happens when the projectile overlaps. With the projectile, it doesn’t automatically just do something when it overlaps a sprite. What you need is this block:

 ![Screenshot 2021-06-21 9.44.38 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/af10d6ad3691dd34bba77394a070363398f6cfaf.png)  
And then inside of it you can have whatever you want happen.

---

<div class="post-metadata">

**Author:** ![helpmepls](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@helpmepls](https://forum.makecode.com/u/helpmepls)\
**Post date:** [June 22, 2021, 3:22pm UTC](https://forum.makecode.com/t/multiplayer-shooting/8855/3 "2021-06-22T15:22:14Z")

</div>

![Screenshot 2021-06-22 at 4.51.41 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/0/0f4e2c394d748dc2df530e04e51d6e5b82f4b3d3.png)  
I have tried that, but it doesn’t work, and the game won’t load.

---

<div class="post-metadata">

**Author:** ![biscuit](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/biscuit/32/4404_2.png) [@biscuit](https://forum.makecode.com/u/biscuit)\
**Post date:** [June 22, 2021, 5:02pm UTC](https://forum.makecode.com/t/multiplayer-shooting/8855/4 "2021-06-22T17:02:13Z")

</div>

The reason for this is that you are using it incorrectly. Because there are errors, it won’t start the program. You don’t put the sprite name in the overlap code, and the reason for this is because it is sprite of kind (), and not a specific sprite. Whatever type of sprite laser\_cannon1 is is what you would put there at the top instead of the sprite name. Same goes for the mySprite2. Afterwards, to destroy the projectile, all you have to do is destroy sprite. It should look like this:

 ![Screenshot 2021-06-22 10.58.23 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/0/0dad27f56ff5c22ce2ff014cdfd7060330c4c457.png)  
(The error there is just due to some lag I was having and not an actual problem with the code)  
Makecode can be confusing, but it’s a great coding platform once you learn it. Hope this works for you!

---

<div class="post-metadata">

**Author:** ![helpmepls](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@helpmepls](https://forum.makecode.com/u/helpmepls)\
**Post date:** [June 29, 2021, 4:00pm UTC](https://forum.makecode.com/t/multiplayer-shooting/8855/5 "2021-06-29T16:00:35Z")

</div>

ok, thanks!
