So I’m trying to create a widget that shows what role the player was assigned. The correct role is shown to the server but when the client gets the widget it shows the servers role.
I understand that the reason for this is that it is getting the Player State Index of 0, meaning the first player to join i.e. the server. How to I go about setting the player state to the local players State Index? Not sure if that makes sense but here is the blueprint I currently have:
I’ve gone with a little different approach, instead of trying to change the text of one widget and then send that to the player I just made 5 different widgets for each role type and create matching widget when the player possesses said role’s blueprint.
The issue I’m having now is the widget shows on everyone’s screen:
Did a simple server and client replication. Fixed the overlapping widgets on the client, but the server player still gets overlapping widgets. Any suggestions?
This blueprint spawns the widget on all the clients, but the host / server does not have a widget pop up. I’m completely lost but my head is about to explode so time for bed. ANY input would be great.
I imagine this only works because of the way player spawns are set up. When the game starts the players are assigned a role and then the server spawns that roles Character Blueprint and makes the client possess said blueprint / actor. Then in each character blueprint the above code is ran.