I recently came across a problem that my replication is not working. I have already tried to fix this many times and searched for information on various forums.
Get to the point. I have a function that does 3 basic things. 1 spawn objects, 2 delete objects, 3 upgrade objects to a new level. The function works fine on the server side, but nothing works on the client side. The function performs its actions, but it is not visible either on the server or the clients
if the player calls a function on the server, it will use the server variables.
ie you have a BuildingMode enum that isn’t replicated, so when you Multicast BuildObject each actor will use its own version of the variable.
what you need to do is either
Pass the variable to the server as an input on LeftMouseButton(server )and replicate it
OR
when you set that variable, set it with a Server RPC and replicate it back.
this goes for all player defined variables, so for instance BuildModeOn? etc