# How to spawn a projectile at the end of a gun for multiplayer

**URL:** <https://forums.unrealengine.com/t/how-to-spawn-a-projectile-at-the-end-of-a-gun-for-multiplayer/329427>\
**Category:** World Creation\
**Tags:** projectile-hit, unreal-engine, Multiplayer, projectile, UE4, Blueprint, question\
**Created:** [August 21, 2015, 1:45am UTC](https://forums.unrealengine.com/t/how-to-spawn-a-projectile-at-the-end-of-a-gun-for-multiplayer/329427 "2015-08-21T01:45:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alydus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alydus](https://forums.unrealengine.com/u/Alydus)\
**Post date:** [August 21, 2015, 1:45am UTC](https://forums.unrealengine.com/t/how-to-spawn-a-projectile-at-the-end-of-a-gun-for-multiplayer/329427/1 "2015-08-21T01:45:45Z")

</div>

I’ve been talking to some people in the unreal engine irc’s and i cannot work out how to get projectile spawning to work for multiplayer, i’m not really sure how to even start spawning a projectile out the end of a gun, especially not working with multiplayer.

Could someone please show me a simple blueprint for projectile spawning at the end of a gun, and it working for multiplayer? (replication and such) I’m also not sure how to handle a simple damage system for other players when a projectile would hit.

Thanks alot!

---

<div class="post-metadata">

**Author:** ![Devero](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Devero](https://forums.unrealengine.com/u/Devero)\
**Post date:** [August 21, 2015, 12:34pm UTC](https://forums.unrealengine.com/t/how-to-spawn-a-projectile-at-the-end-of-a-gun-for-multiplayer/329427/2 "2015-08-21T12:34:45Z")

</div>

Basically, you need to set Socket locations at the end your mesh where you want the projectiles to spawn. Thats your first step.

It would be good for you to look into First Person Template to really get a feel on how spawning projectiles work. For multiplayer, you will need to have a RPC to the server to initiate the spawn. Then make sure the projectile itself is replicated in its detail panels.

Thats one generic way of doing it. However, Its best to really understand this fundamental process by tearing apart a project template. Good luck!

---

<div class="post-metadata">

**Author:** ![qdelpeche](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/qdelpeche/32/776509_2.png) [@qdelpeche](https://forums.unrealengine.com/u/qdelpeche)\
**Post date:** [August 21, 2015, 12:36pm UTC](https://forums.unrealengine.com/t/how-to-spawn-a-projectile-at-the-end-of-a-gun-for-multiplayer/329427/3 "2015-08-21T12:36:22Z")

</div>

The best solution as Devero suggested is to use the First Person Template. Take that Template and make it Network Enabled … I have done it a few times and it isn’t actually too difficult to do.

---

<div class="post-metadata">

**Author:** ![Alydus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alydus](https://forums.unrealengine.com/u/Alydus)\
**Post date:** [August 21, 2015, 1:59pm UTC](https://forums.unrealengine.com/t/how-to-spawn-a-projectile-at-the-end-of-a-gun-for-multiplayer/329427/4 "2015-08-21T13:59:56Z")

</div>

The first person template doesn’t have a gun anymore, i don’t know why.

---

<div class="post-metadata">

**Author:** ![insanerob](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@insanerob](https://forums.unrealengine.com/u/insanerob)\
**Post date:** [August 22, 2015, 9:02pm UTC](https://forums.unrealengine.com/t/how-to-spawn-a-projectile-at-the-end-of-a-gun-for-multiplayer/329427/5 "2015-08-22T21:02:45Z")

</div>

Luckily for you Billy Brammer made an awesome set of vids for Networking that just happen to contain getting the server to spawn projectiles for you 🙂

> **[Blueprint Networking Tutorials in Unreal Engine 4](https://www.unrealengine.com/en-US/blog/blueprint-networking-tutorials)**
>
> A previous blog post offered a crash course in blueprint networking, but now we’re back with a thrilling six-part mini-series on creating blueprint content that works in a networked game!

As Devero mentioned you need to spawn it from a socket location at the end of your gun, so remember to get that socket location and rotation instead of self Forward Vector and Location .  
GL , rOb 🙂
