I’ve been working on a little 1V1 snipper project to try and get a better grip on the replication and the game framework of unreal engine.
So after the core gameplay, I’m trying to make a lobby system. I’ve been able to make the player join together without any issues, but I struggle a little bit with the replication. I’m trying to show the player’s name over their pawn in the lobby, and I can’t get it to work. In the client, both their name doesn’t get replicated, and in the server, only the server name appear:
And I get this error from the server logs
[2020.01.21-00.45.03:318][906]PIE: Error: Only Local Player Controllers can be assigned
to widgets.
BP_PlayerLobbyController_C_1 is not a Local Player Controller.
So I get that something is wrong with accessing the 2nd player controller from bluprint like this
But I don’t know how to make it work other wise. I’ve set the PlayerName widget to replicated, but it doesn’t seem to work.
Any idea on how I could get this to work?