Multiplayer Damage

Hi, im making a multiplayer shooter and i nee help with the damage and health system, i have a projectile from the gun hitting the player causing damage but only on the server not on the client, i have replicated the events but i cant damage things with the client. please help.

Health system
how the projectile causes damage
Shooting bp

I have watched the unreal networking tutorials but like he said i wasnt thinking about multiplayer until i had finished the charactes bp, so now im not sure how to edit to be able to do multiplayer

To fix your problem, all you need to do is click on the damage variable, and set it to replicated. You said you have the events being replicated, but I assume you didn’t set the variables to replicated.

Also, you dont need to call the shooting event in multicast, but rather on the server. Just make sure your projectile is set as replicated.

Hi sorry, what variable because i dont see a damage variable, i have changed the health to replicated and all the others you said but it doesnt work

Is your project using a dedicated server? If not, Im not really sure how to do this efficiently. If you want to use a dedicated server, you can go into your play options and check use dedicated server, and this should work.

im running dedicated server, thanks for the help, is there any tutorials or other posts to help?

I believe I have found your problem. You need to set ALL of your variables to replicated. You also need to call the changes on the server. For example, make a custom event replicated to server, which sets your “NeedReload” variable to the output. Then where you were setting NeedReload before, call the function, and check whether it should be true or false as an input. Sorry if that is confusing… Here is an example. If this doesn’t work, Ill find you a tutorial.

My own version (damage variable is set to replicated)