The value of the variable in PlayerState not changing on Client

I am developing a lobby system and I want to add the “ToggleReady” functionality. When the UW_BaseButton_ToggleReady button is clicked, the Ready boolean value in the PlayerLobbyInfo structure of the PlayerState class for the corresponding player needs to be changed. I am new to multiplayer development, I need help on how to integrate and implement this functionality.

My initial plan was to create an OnServer event in the PlayerController, access the PlayerState of the specified PlayerController in the GameMode to change the relevant value, and then use RepNotify to update the player’s HUD when the structure’s value changes. However, when I attempted to implement this, only the server’s Ready variable value changed, and when I tried to check this value for active clients using the GameMode, only the server’s value appeared as true.

LobbyHUD:

LobbyPlayerController:

LobbyGameMode:

MainPlayerState:

Can you give me an idea how I can do this?

Add a print string at each step. Are all events being called?

Yes, but while it works fine on the Server, the value changes after 4-5 seconds, although there is no delay in the Client. When I print the current values, both values are the same but different values are written on the screen.

I solved the problem using GameState, I leave the code here if anyone needs it;

LocalPlayerController:


(I run this Event when I press the Button.)

GameState:


Then I replace the value of the Player in Map with this function in GameState.