Server and client replication problems

Hey!

So I have a weird replication problem. I have a set up where my weapon sends a “give damage” call to my character blueprint. If I plug this damage in to my “set health” and print string, every single player sees the damage message on screen. In my case I run one server and two clients in PIE, so when whoever hits someone else it prints “Server: DMG - Client1: DMG - Client1: DMG” for everyone. Now, if I instead plug my “give damage” into a custom event to execute on server, and then set the server event to “set health” something strange happens. When the server hits a client, it prints “Server: DMG” twice (and also gives damage twice), but if a client hits a server it prints it only once (and gives damage only once). If a client hits another client, it also prints and gives damage twice. This problem persist if I plug the server event into a multicast event. What is going on? How can I make so when someone takes damage, it is executed on server ONLY ONCE per hit, and then passes it to all clients to see?

After some further investigating I found out that this event somehow always fires from server, so I could get past the problem (for now) with a branch with “Has authority” as condition. Now it only fires when it has authority, which somehow is default with this event…! It works though!