UMG Progress bar problem

Hello, i don’t really like to ask for help here but this is bugging me…

I posted on the Answer hub first but no answer.
To make things easy and not complicate it with stuff that’s not involved i made a new project to replicate my problem.

So here it is
My Character has UMG widget hud with a progress bar. That progress bar gets its value from the variable that my character has.
Here is where the problem starts, this works fine when running on the server/single player but as soon as i run it in multiplayer it does not work for the clients, the progress bar just displays empty.

Is it some kind of replication issue? but should it not work on the client only that the other clients does not get the update?

Here is how my example looks:

I haven’t read the thread in depth, but the Player Index in the widget BP made me wonder how the player index works in MP. See if this thread helps at all c:

Yhea i looked over that thread, but cant find the solution for me there, in his example he gets the actor from a trigger box, this is not the case for me.

You need to limit who creates a UI. Right now every character is creating a HUD, that includes replicated characters from other users, you definitely don’t want that. So only do this if the player controller who owns the character is local.

I made an custom event that’s not replicating to server or any other clients, but problem still exist that in my UMG_HUD i have “Get Player Character” whits is indexing player 0, i think this is the problem but i am clue less how to solve it.

Im relatively new to this but can you not set the player index number when spawning a new character and set that as a variable to change each time another one is created?

Maybe but every player sets likes seems with different numbes like C_31 _18 and so on, and dont see how i can hook it up with the Get player controller… It must be a correct way of fixing this issue.

Why not pass in the character’s player controller when creating the widget, so it’s explicit?

Hi, thanks for replying,

Like this you mean?

problem still exist on the clients, works on server/singelplayer but that’s probably beaus this “Get Player Controller” still Index player 0

Nope, you’re still passing in Get Player Controller 0, that’s not as I said, the player controller that owns the character. You should wait until possession, or make it the job of the player controller and not the character to generate the UI. Once possession happens you could then create the UI and forward on the instance of the PC that possessed the character.