# Damage taken by replication but i don't want this

**URL:** <https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665>\
**Category:** Programming & Scripting\
**Tags:** health, damage, health-bar, unreal-engine, enemy, Blueprint, question\
**Created:** [October 22, 2024, 6:06am UTC](https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665 "2024-10-22T06:06:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rinoma0302](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rinoma0302](https://forums.unrealengine.com/u/Rinoma0302)\
**Post date:** [October 22, 2024, 6:06am UTC](https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665/1 "2024-10-22T06:06:24Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/f/60f679c9430779ae841dd37c19c85f0d3427a05f.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/9/8/a983742c753cfa8a88d4ca41bfd026ea2f6483bf.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/f/6bf27c4732903ea04628c39407fd9a3008f790c3.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/f/9ffc78bc33911e9c57861bbc60b593200f5f4e1b.png)

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

**Hello everyone** , I have a replication problem in a situation I shouldn’t have, when an enemy attacks my host player (i.e. in a client server system). He takes damage but the life bar doesn’t display it and the client also takes damage, in the first image you can see it in print in blue.  
Then, with the client, the bar interacts, but this time for both players (at least the host and the client).

**the problem** is that I’ve tried to remove all replication of enemies, and put them in, but nothing changes, same for the main character whose widget I’ve put in viewport unlike before which was just created, and I don’t see any way to deactivate replication in the widget unless I don’t know the trick.

**Thanks in advance for your answers**

---

<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:** [October 22, 2024, 6:37am UTC](https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665/2 "2024-10-22T06:37:51Z")

</div>

Overlaps should only happen on Server to do this has a SwitchHasAuthority after OnBeginOverlap.

Remove the Multicast and make any effected variables SetWithRepNotify then in the OnRep event that it created update your widgets etc

---

<div class="post-metadata">

**Author:** ![Rinoma0302](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rinoma0302](https://forums.unrealengine.com/u/Rinoma0302)\
**Post date:** [October 22, 2024, 6:46am UTC](https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665/3 "2024-10-22T06:46:47Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/d/b5ddfa3efc4ad009fb35bb6e3aa5f3c69f9881a1.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/c/accabd757cd5008576b4a0649aa82d4b06c48d43.png)

and if I have to set the variable that modifies the widget in onrep to modify them in the create onrep function, then it must go through the main player and not the enemy?

---

<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:** [October 22, 2024, 7:07am UTC](https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665/4 "2024-10-22T07:07:04Z")

</div>

im not sure what you mean on that last bit sorry, if you mean updating the LifeBar widget yes you’d call that function in the OnRep event.

---

<div class="post-metadata">

**Author:** ![Rinoma0302](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rinoma0302](https://forums.unrealengine.com/u/Rinoma0302)\
**Post date:** [October 22, 2024, 7:09am UTC](https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665/5 "2024-10-22T07:09:15Z")

</div>

even if the life bar is specific to each character? even if the life bar is specific to each character? So they don’t have to be replicated normally ?

---

<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:** [October 22, 2024, 7:32am UTC](https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665/6 "2024-10-22T07:32:34Z")

</div>

Yep, for variables RepNotify is the normal replication.

Multicast is for Events like a SoundCue or ImpactFX

---

<div class="post-metadata">

**Author:** ![Rinoma0302](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rinoma0302](https://forums.unrealengine.com/u/Rinoma0302)\
**Post date:** [October 22, 2024, 7:33am UTC](https://forums.unrealengine.com/t/damage-taken-by-replication-but-i-dont-want-this/2079665/7 "2024-10-22T07:33:52Z")

</div>

ok i will test it thanks
