Character Respawn in multiplayer

I am having trouble with the respawn widget i created showing on the server when the client dies this is not a problem for the server only the client. Here is the character setup

Help would be appreciated.

It seems to me this is a very unclean way of doing things…

What exactly is it you are trying to achieve?

Once you reach this point, you want the client to possess some “Camera P” actor and destroy the current “Howitzer” actor.

After that, the same player should have a widget created so he can select his next character?

First of all, I think you shouldn’t just possess some actor with this Get [0] node, I’d prefer spawning a clean one on the server and possess this instead. (Also I don’t even think this cross event cast works, you’d need to pass the actor as event input)

Secondly, I don’t know how reliable the GetPlayerController [0] on clients is. My expectation is that you just get some random PC and don’t know whoever that is, so you can’t be sure if it’s actually your client. To fix this you’d need to keep the reference to the player controller before unpossessing. Better yet, make a call to a client event from the existing server event, pass the reference to the controller there and in there, create the widget (can only be added to viewport client side and only to itself, not to other clients, so that could be why it’s not working.

Have you tried setting breakpoints and see if it actually fires everything and the values are there too?

Please explain further so we can better help you.

The first sequence works fine its purpose is to posses a camera while waiting for a respawn. The second sequence is where the problem is, when is spawn the widget it shows only on the server not on the desired view port the widget has the character selection and spawning code.

You’ll have to make sure that the widget handling runs on every client and every clients needs to do this for themselves as they won’t be able to access the widgets of other clients. Therefor I recommend to first make sure that you are accessing the correct Player Controller (keep a reference before unpossessing)

Widgets are client side only. You can still utilize server side data within each players individual widget. For instance, the scoreboard within a game. Each player owns their own version of the scoreboard, but the data for kills and deaths would be represented by server data.

I understand the problem is when i create the widget on the client the server is the one who has it added to his hud.

Thanks for the help I had to us a Run on client RPC and the check if it was locally controlled like you said.