Hello. I am trying to make a simple respawn system where when the player dies, it calls an event on the player controller to respawn the player. At the moment, it is working for only the host. If a client dies, they don’t respawn. (- YouTube)
The Request a Respawn event says Execute On Owning Client so what I think is happening is that your Get Game Mode node is returning null, therefore, the cast is failing and so the Respawn Player event isn’t even running.
In a networked game, the game mode only exists in the server. So you shouldn’t try to get game mode when you are in the client.
I see your point. I added a print string node to the cast failed and sure enough, I got the cast failed node to go through. I’m working on using a variable for a reference and using that but I’m not getting much luck. How would I do that?
I found a solution. By replacing the Respawn Player Event inside the Player Blueprint with a Cast to GameMode (Get Game Mode) followed by Cast to Player Controller (Get Controller) and then using the Respawn Player Event inside the GameMode, and the Player Controller as the controller.
What works for me is to have a IsAlive bool setup with OnRep, and the Controller has a branch which checks if the condition is valid, if true the Controller calls the RipScreen.