PlayerController variable replication to other clients issue

I am trying to implement replicated variables inside a PlayerController from one client to others. I am currently running a dedicated server in the background and several clients. I have a PlayerController where I am currently storing an input variable which indicates whether the user is currently pressing a button, which needs to be propagated to other clients because it is used for playing animations. The variable in question is set to “Replicated” and I make a call to a Custom Event set to “Run on Server” and “Reliable” whenever a user presses the button, which in turn sets the variable in question. Both of these are implemented inside the event graph of the PlayerController. For some reason, I cannot get the variable to be replicated to the other clients connected to the dedicated server. The PlayerController’s Class Defaults also have “Replicated” checked to true.

Now, I’ll go over what I have tested. I have tried running the server without being dedicated and I do see the variable being changed from client to server (i.e. when the client does something, the server does get the changes), but when the server does an action, the client doesn’t receive the updated variable.

Second, I have also tried to take all the logic described above, and move it into the Character blueprint associated with the PlayerController in question, and everything gets replicated fine.

Any ideas?

PlayerController only exist in Owning Client, and server, no controller on other client. To replicate anything on PlayerController to other client, you can do it through PlayerState, that the purpose of PlayerState, to replicate instead of Playercontroller. Like with GameMode only exist in server, and GameState is replicate anything you want from GameMode to other client.

You can do the check very simple on your character:

  1. Owning Client: HasAuthority is in Remote and your character Controller is Valid
  2. Server: HasAuthority is in Authority and your character Controller is Valid
  3. Remote Client: HasAuthority is in Remote and your character Controller is Not Valid

Duncan, thank you very much for the hasty reply and thorough explanation. I will make use of the knowledge you have shared with me. Cheers!