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.
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.
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.
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.