Having a problem with replication

Hello everyone. I usually don’t post here to get an answer for my problem but this one is messing with me a lot. So i am trying to increment a variable from my furnace actor while i press a button. I want this button to add one every time a player clicks the button. I want it to run on the server side so every time someone presses it it keeps on adding without having a unique value for every player.

That’s a classic networking problem.

Things to make sure of:

  1. The furnace actor replicates.
  2. The property you incerement replicates.
  3. Make a server RPC event that is run when the input is clicked (either in PlayerController class or your possessed Pawn class).
  4. From that server RPC you access the furnace actor and increment the property.
4 Likes