How do I replicate the damage when the client shoots at the server

when I shoot the server from the client the damage is only show on the client’s screen but when i shoot the client from the server the damage is dealt to the client and he dies and his health bar goes to zero.

this image shows the input action of fire that castes to the base gun and fires the custom event

the base gun has custom events to call too that go into other guns

this is a actor component to fire the custom event in base gun and fires the line trace and tell if you hit the character actor to deal damage too

the client shoots the server but the server doesn’t take damage and only the client see that he is dead

the server is shooting the client and it shows that he is dead on the servers screen and on his screen and shows that the healthbar is at zero meaning that he is dead

I can’t see all Important parts of your code, but you didn’t replicate any function.

You want to check and set variables through the server. Therefore you need to set the custom events to “run on server”. Also the linetrace should be done running on the server.