The value of the variable in PlayerState not changing on Client

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.