Download

Multiplayer: After Respawn >> Pawn has no mesh.

Hey everyone ! :slight_smile:

I’ve got a problem. After my character got respawned he has no mesh.
But the normal functions are working ( health and other stuff ).

Gamemode:
0d974cac24b428671e4d71f147aac3921f084001.jpeg

Controller:
2bb9b8adec7744534e97d88fbb15d1af8bcd1d09.jpeg

And also how do I destroy the old actor ? I tried with destroy actor self but the pawn is still there…

I guess you set the Pawn to be replicated, so destroying must be done on the Server. Client’s will only destroy their own local version, since they have no Authority.
If the Server destroys it, it will be destroyed on all Clients. I don’t know where you want to do this. Maybe at the point where the Pawn gets less or equal than 0 health?
But yeah “Destroy Actor” is the way to go.

Then, the GAMEMODE only exists on the Server. You can’t get it on Clients and you can’t call stuff on it from Clients.
So you DON’T need a Server RPC for it. I mean the “RESPAWN” function can be a normal event.

Your “RequestGMRespawn” is already a Server RPC, so you are already on the Server. No need to do another Server RPC.

And: Why are you casting “Self” to its own class? Remove the Cast that has the Warning. The warning should already tell you
that the cast node makes no sense.

The rest should work. Are you sure the Pawn is getting spawned at all? Print Strings and Breakpoints can help to check if stuff
is called at all.

Allright so I found something helpful on youtube:

Maybe this can help me … I share later some results :wink:

Cheers!

Well I’ve made it without the tutorial because an didn’t want to watch 50 minutes I tried by myself…
The result:
Before you let the character respawn destory the old actor.
:

Gamemode:

Controller:
200de4666e72e65a87cea73eb201c7b6599cdd06.jpeg

Pawn:

Cheers and thanks for your help :slight_smile: