Replication issues

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

1 Like