# How can I make it so that the ui is not replicated to the other clients(server)?

**URL:** <https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390>\
**Category:** Blueprint\
**Tags:** client, Replication, listen-server, unreal-engine, UI, Blueprint, question\
**Created:** [February 11, 2024, 8:24pm UTC](https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390 "2024-02-11T20:24:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DonJuan1232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonJuan1232](https://forums.unrealengine.com/u/DonJuan1232)\
**Post date:** [February 11, 2024, 8:24pm UTC](https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390/1 "2024-02-11T20:24:35Z")

</div>

So I am making a multiplayer fps game.

When I create a session the ui is all fine but when a client joins the session his ui is also replicated on the server wich I dont want to happen. I currently set the ui in the event BeginPlay, I also tried custom events with owing client only but that doesnt work.

If you know what I am doing wrong please let me know. Thank you

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/2/b72421a4f5255daf53fe35150f26d425f7614752.png)

---

<div class="post-metadata">

**Author:** ![Sitiana](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sitiana/32/1194605_2.png) [@Sitiana](https://forums.unrealengine.com/u/Sitiana)\
**Post date:** [February 11, 2024, 9:50pm UTC](https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390/2 "2024-02-11T21:50:44Z")

</div>

Hi, you’ve got 2 useful nodes for multiplayer to organize logic between server and client.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/3/d5388d015a37c4848d6f109c5e0dab4f20755fe2.png)

SwitchHasAuthority (Authority - runs on server only, Remote runs on client only)

IsLocalPlayerController - this will be true only if controller is owned by a real player (server and client). So it’s useful for spawning UI, as it will be spawned in the same way for server and client, but it won’t be spawned for replicated controllers.

I think if you use Branch with IsLocalPlayerController before spawning UI, this should solve your issue.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [February 11, 2024, 10:39pm UTC](https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390/3 "2024-02-11T22:39:39Z")

</div>

Hey there @DonJuan1232! Sitiana is correct, just adding some extra resources for other visual learners. The video doesn’t into extreme detail on all the factors you’ll need however.

**Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.**

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/4/3f4c75e799a1bfe16a9e3797dfd4da6618ac4fb9.jpeg "Multiplayer Widgets On One Or All Screens | Replication - Unreal Engine Tutorial") ](https://www.youtube.com/watch?v=2GYicrkCElA)

---

<div class="post-metadata">

**Author:** ![DonJuan1232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonJuan1232](https://forums.unrealengine.com/u/DonJuan1232)\
**Post date:** [February 12, 2024, 7:46am UTC](https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390/4 "2024-02-12T07:46:57Z")

</div>

Thank you this helps @Sitiana, But for the guns in the game They are “pawns” if I say that correctly (a component I attach to the player)  
I add the ui from that the same way as the health I showed.

Is there a way i can use IsLocallyControlled then some how to get the player the gun is attached to and see if that is locally controlled. Or should I pass on the result from IsLocallyControlled from the player to the gun.

I hope this makes sense what I am saying.

---

<div class="post-metadata">

**Author:** ![Sitiana](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sitiana/32/1194605_2.png) [@Sitiana](https://forums.unrealengine.com/u/Sitiana)\
**Post date:** [February 12, 2024, 12:40pm UTC](https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390/5 "2024-02-12T12:40:55Z")

</div>

If Guns are pawns then you can get their controllers and check it the same way (make sure to validate controllers, as other players’ guns on clients won’t have their controllers).

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/c/bfcc1c6d72564974e706ea552776c3a766d6a70f.png)

But general rule is that controllers should be responsible for player UI. If you have different UIs per gun, you could send UI class to the controller and create it there. It’s easier to manage.

---

<div class="post-metadata">

**Author:** ![DonJuan1232](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DonJuan1232](https://forums.unrealengine.com/u/DonJuan1232)\
**Post date:** [February 12, 2024, 3:18pm UTC](https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390/6 "2024-02-12T15:18:24Z")

</div>

Thank you it works now 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 13, 2024, 3:19pm UTC](https://forums.unrealengine.com/t/how-can-i-make-it-so-that-the-ui-is-not-replicated-to-the-other-clients-server/1682390/7 "2024-03-13T15:19:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
