Remove HUD from client after dying on server

So I have a basic kill and respawn system where the player will take 4 hits and then “die”, in that i delete the pawn’s actor and wait 5 seconds and then spawn and posses another one. All of this works on the server, client can kill server, server can kill client, but what I want to do is remove the hud or make it invisible when the player dies, then make it visible again when they respawn. I was able to get it working properly for the server, but whenever I try to do it for the client i am getting a “none” error when I try to access the HUD widget. Where exactly am I supposed to call the HUD remove stuff? In the Any Damage pipeline? In the server code for the respawn stuff? I guess I don’t understand exactly where the HUD exists on the server?

Since the player controller doesn’t replicate, you won’t be able to get the player controller’s HUD with the method you’ve described. However, if you build a listener into the HUD that checks for a gamestate (gamestate’s do replicate), then the HUD can react to whatever the gamestate is. So for example, when my Gameplay HUD widget ticks, it checks the custom gamestate which has an enumerator in it with different states (playing, game over, loading, etc). If the gamestate enumerator equals game over, the widget removes itself. Not sure if this is the most efficient way of doing things, but has worked for me thus far.