Multiplayer is making me go insane

Hello guys,

My brain hurts. A lot. I’ve been trying and trying and trying to get the most simple feature working, to no avail.

Basically, on server startup I have team actors spawn (They replicate).
Then on every player login, I have a team handed to them. This is done by running a function on the server to set a replicated variable called “team” on the player state.

But…

It never gets set locally. Hell, it never gets set on the server.
I really wanted the team to be stored on the player controller to make it so it would be personal and so the other clients wouldn’t know about it, but that won’t do until I can even do this.

My brain hurts.

If anyone has tips PLEASE HELP AGHGGGGGGH

If it doesn’t get set on the server then the function isn’t running (duh), how are you handling this? I would probably do it on GameMode, onPostLogin event. Maybe try that.

U should do handle it in gamemode, like DjS says (is the authority, cause it is handled by the server and is like giving orders from server). If u cant get reference to variables, did u try to do events in >server>all ? Did u try to pass references by the event? Did u try to replicate the variables on server ? or only on client?