# Replication is not working for weapons equip from inventory

**URL:** <https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640>\
**Category:** Multiplayer & Networking\
**Tags:** unreal-engine\
**Created:** [May 24, 2016, 2:28pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640 "2016-05-24T14:28:12Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 24, 2016, 2:28pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/1 "2016-05-24T14:28:12Z")

</div>

i need a tutorial for replication

1 2 3 4th pics is in my character bp

5 and 6th pic is in my anim bp

7th pic is in Widget bp

 ![1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/b/ab383f88c2c3559e45161793f8eab31429f8e378.jpeg)  
 ![2.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/a/da2fef333accef2d5e5ead3bd42de0c031f6cfd9.png)  
 ![3.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/a/ea9812ee4ff6820fe53664799af7e201d9eea1d2.png)  
 ![4.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/0/20cbbb07784d9f424f987f311d2fedc21a6a9d7b.png)  
 ![5.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/4/e423e7e5d674379a529131ac22c8445b38652e49.png)  
 ![6.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/8/a8700fb3b09b4c7b79311cb8c4a43da579cc36b2.png)  
 ![1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/b/ab383f88c2c3559e45161793f8eab31429f8e378.jpeg)

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [May 25, 2016, 2:19am UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/2 "2016-05-25T02:19:17Z")

</div>

You need to specify what exactly is your problem instead of throwing all your bps here and expect us to guess what’s wrong. Replication is not a simple topic.

There’s a lot of tutorials about unreal engine replication on youtube.

[https://www.youtube.com/results?search\_query=unreal+engine+replication&page=&utm\_source=opensearch](https://www.youtube.com/results?search_query=unreal+engine+replication&page=&utm_source=opensearch)

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 25, 2016, 3:05am UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/3 "2016-05-25T03:05:32Z")

</div>

i played multiplayer with 2 player in dedicated server when i equip weapon from client 1 it is not showing in client 2

 ![8.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/b/ab497005279731bea3bcdd2dfc22f7cc4a49995f.png)

---

<div class="post-metadata">

**Author:** ![Arechon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Arechon](https://forums.unrealengine.com/u/Arechon)\
**Post date:** [May 25, 2016, 10:40am UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/4 "2016-05-25T10:40:35Z")

</div>

Is the Gun-actor being replicated? You can do this by selecting the root in the Blueprint. Make sure to check “Replicates” and “Replicates Movement”.

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 25, 2016, 11:44am UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/5 "2016-05-25T11:44:49Z")

</div>

it dint work

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [May 25, 2016, 6:30pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/6 "2016-05-25T18:30:17Z")

</div>

When you start equipping you must call it from the server, to replicate to all clients:

Start equip -\> Switch Has autorithy -\> Authority -\> Start equipping  
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ -\> Remote -\> Call Event that executes on server and that calls Start equip again -\> Start Equipping

My suggestion is that you take some time to understand how the Server events and Multicast works and follow examples on youtube, testing with simple projects, before start venturing yourself in specific implementations.

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [May 25, 2016, 6:41pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/7 "2016-05-25T18:41:08Z")

</div>

You can start by looking how he made the logic in [this](https://youtu.be/OcBMXIHUMLQ?t=325) part of the video to replicate correctly.

check this [video](https://www.youtube.com/watch?v=chpi4R_5Om0), too, for an overview.

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 26, 2016, 4:41am UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/8 "2016-05-26T04:41:55Z")

</div>

Okay thx for the info

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 26, 2016, 2:04pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/9 "2016-05-26T14:04:48Z")

</div>

i followed that video but i cant fix mine but now it is playing in sever and showing the weapon in sever player in client but it is not equiping gun in client i am using switch autority

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [May 26, 2016, 4:32pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/10 "2016-05-26T16:32:47Z")

</div>

Show us what you’ve modified.

Have you tried avoiding Multicast and making something similar to this:

 ![2222.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/8/48f7ba5571ae4bbe827c7973e40654d0c0eb7127.jpeg)

As you can see, my Event Server Equip Weapon is not multicasting, it is set to “Run on server”.

Another thing you should notice is that, as a Remote client, even after calling the Server Equip Weapon I pinned to Equip Weapon function in the sequence, for the client to run properly inside itself the animation, sound and effects that comes after. Otherwise it would run to everyone excepts to itself.

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 27, 2016, 2:48pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/11 "2016-05-27T14:48:36Z")

</div>

> [@Gbr;536598](#):
>
> Show us what you’ve modified.
> 
> Have you tried avoiding Multicast and making something similar to this:
> 
> ![2222.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/8/48f7ba5571ae4bbe827c7973e40654d0c0eb7127.jpeg)
> 
> As you can see, my Event Server Equip Weapon is not multicasting, it is set to “Run on server”.
> 
> Another thing you should notice is that, as a Remote client, even after calling the Server Equip Weapon I pinned to Equip Weapon function in the sequence, for the client to run properly inside itself the animation, sound and effects that comes after. Otherwise it would run to everyone excepts to itself.

now i played with deciated server off with 2 player if i equip weapon in server the weapon i choose there is only can be switched in client player too see the pic but i cant play with deciated server on it is not equiping weapon 1a,2a,3a,4a,5a pics are in my character bp the variables in that pic is replicated the other pics are in widget bp

i followed this 2 tutorials

[http://shootertutorial.com/2015/06/06/how-to-create-inventory/](http://shootertutorial.com/2015/06/06/how-to-create-inventory/)

[http://shootertutorial.com/2015/06/08/how-to-add-weapons-basics-equipping/](http://shootertutorial.com/2015/06/08/how-to-add-weapons-basics-equipping/)

Pls tell me how to fix that

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 27, 2016, 2:52pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/12 "2016-05-27T14:52:55Z")

</div>

![1a.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/1/c/61c015cb027192706b1a5279223fcbf994f0f9f8.png)  
 ![2a.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/7/6874009ff1b92f3794083462170bcb9bd0b79b53.png)  
 ![3a.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/2/e3277166753bc4ce4ce14525248f675fe8915118.png)  
 ![4a.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/4/944f18f75da52bc03b2d63e6f6bcac4be72c03cf.png)  
 ![5a.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/c/9/1c9e3313270e143e53fa4b1e1012226de84254ed.png)  
 ![6a.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/e/7ea3508f7c2b4dddaf2bef8da9c757ac6f802b1b.png)  
 ![7a.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/9/6929c953dd5d8feeba32872a70168b391fc1396d.png)  
 ![construct.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/c/3c8d53a9143a5e6fb0e3adb27953ff14c6edba76.jpeg)  
 ![createbackpack.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/f/dfe33e0074d4142b3413386f358504f89cda966c.jpeg)  
 ![focusdisp.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/3/a328f367dc6b7fa1d4716a059abfd7a75a0b3afe.jpeg)  
 ![getfirstfreeslot.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/8/58ffc7596536590014aef6e34dabeebad0a531ea.jpeg)  
 ![itemclickedinselectedweapons.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/4/646da208f196ed9b993a16cbb9673b40f234def3.jpeg)  
 ![iteminbackpack.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/2/f26dac48e9ba31729f4196d413e2a60d07d3c4c0.png)

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [May 27, 2016, 3:38pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/13 "2016-05-27T15:38:26Z")

</div>

Didn’t get exactly what is your problem by your description, but try to make the same way I showed you, in the last picture, just after the InputAction WeaponSlot1 and test it.

You can always debug or print in any part of the code to see which client(Server or Local) is calling the events/functions, like printing whenever you call the Equip Weapon function to see if the Server or the client is calling it.

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 28, 2016, 2:26am UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/14 "2016-05-28T02:26:54Z")

</div>

if i run dedicated server with 2 players i cant equip weapon it is opening the inventory and if i selecte 3 weapons and it is not showing the equiped weapon in the character hand

see the pics above for my bps

or can you see that both tutorial i mention above and tell me how to make it work with multiplayer

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [May 28, 2016, 2:21pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/15 "2016-05-28T14:21:01Z")

</div>

Did you try printing/debugging to find where the replication problem starts?

Did you try making your logic like in this pic?

 ![123123123.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/b/5b8f0a5796f03de672c0e44aba400fbef1646c34.jpeg)

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 28, 2016, 2:46pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/16 "2016-05-28T14:46:56Z")

</div>

yup i did like that

---

<div class="post-metadata">

**Author:** ![fRz\_Berry410](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fRz\_Berry410](https://forums.unrealengine.com/u/fRz_Berry410)\
**Post date:** [May 28, 2016, 2:50pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/17 "2016-05-28T14:50:46Z")

</div>

my problem is it is taking the weapon which i choose in server and equiping it in server character & in client character

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [May 28, 2016, 3:13pm UTC](https://forums.unrealengine.com/t/replication-is-not-working-for-weapons-equip-from-inventory/64640/18 "2016-05-28T15:13:00Z")

</div>

Probably because your backpack variable is being taken from the server.

Try this:  
Send your Backpack Weapons variable as an input parameter to SpawnWeaponsAndAssignSlots function, and don’t forget to include it in the Spawn Weapons and Assign Slots on Server event, too. What I see is that you are always using the Server Game instance reference, maybe if you send it via parameter to the function you will send correctly.
