Here is the situation:
I have a multiplayer lobby where each player can select their weapon and ready up to start the game.
In this screenshot the server and the client have selected the same weapon (2) printed to console every tick. The weapon is saved as an integer to the playerstate of each client. However, the issue is that; once the server travels to the gameplay level, the ‘gun’ integer in the player states are reset to 0 and everybody gets the weapon assigned to that. I’ve been plagued by this issue for ages.
I have seamless travel enabled, the player state has bReplicates enabled, the gun variable in the playerstate is also replicated. I have also made sure the PlayerState is used in both the lobby and gameplay level
Here is how the gun variable is set, this is on the lobby widget and is fired whenever you toggle ready.