# Rep Notify vs. RPC vs. Replicated

**URL:** <https://forums.unrealengine.com/t/rep-notify-vs-rpc-vs-replicated/1745633>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 11, 2024, 4:38pm UTC](https://forums.unrealengine.com/t/rep-notify-vs-rpc-vs-replicated/1745633 "2024-03-11T16:38:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwita](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rwita](https://forums.unrealengine.com/u/rwita)\
**Post date:** [March 11, 2024, 4:38pm UTC](https://forums.unrealengine.com/t/rep-notify-vs-rpc-vs-replicated/1745633/1 "2024-03-11T16:38:26Z")

</div>

I am wondering the difference between

A. Using a rep notify to update health, which then runs an update widget event to display current health  
vs  
B. Using an RPC to do the same  
vs.  
C. Simply replicating the health property, and running a tick function client-side to update the player health every second

It seems to me if I want to reduce network traffic option C would be best? Or is using a tick-function high cost on the processor even for something as simple as that. Apologies as I am very new. Cheers.

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [March 12, 2024, 12:25am UTC](https://forums.unrealengine.com/t/rep-notify-vs-rpc-vs-replicated/1745633/2 "2024-03-12T00:25:32Z")

</div>

repnotify is the most efficient as its event driven.

Repnotify updates when relevant - ie if a player joins late it still works  
RPCs only fire once so if a player joins late it wont work. RPCs can also fail.  
Replicated is fine but wont call the event hence you need the tick which is wasteful

---

<div class="post-metadata">

**Author:** ![rwita](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rwita](https://forums.unrealengine.com/u/rwita)\
**Post date:** [March 12, 2024, 12:49am UTC](https://forums.unrealengine.com/t/rep-notify-vs-rpc-vs-replicated/1745633/3 "2024-03-12T00:49:07Z")

</div>

Thanks for your reply. Am I correct in thinking RepNotify is usually the answer then to Server to Client comms? For something like Health where you need to call updates to a widget, or death when it hits 0 it seems like RepNotify is the answer, same with movement and ammo where the change is immediately relevant?

Are there any situations where Replicated is better and then you run a tick every say 10 seconds or so? I’m having trouble imagining what kind of variable in a shooter game would just be say, replicated and not RepNotify. It seems like anything relevant right away should be a RepNotify, or maybe even RPC.

Although I’ve read RPC should only be used when the order of events is relevant. So would a player damage event best be a RPC from client to the server and then a RepNotify from server back to the clients?

Sorry for the simple questions still trying to get my head around it. Appreciate you taking the time.

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [March 12, 2024, 1:56am UTC](https://forums.unrealengine.com/t/rep-notify-vs-rpc-vs-replicated/1745633/4 "2024-03-12T01:56:22Z")

</div>

Use repnotify when you need to be notified, ie health changes on a UI  
you can use replicated when changes dont need to be shown, ie maybe movement speed.

damage should always be done on server but you could RPC back say a damage number popup. this is better than a repnotify because its a one shot, ie if a client joins late they dont need to see previous damage.

and of course you need client to server RPC for player input, so the player can input a fire command and the server runs the damage event if valid
