The actor only gets destroyed when the server executes this code, I have other blueprints with a very similar set up and they work so maybe something else is preventing it?
Also I’ve tried setting the custom event “SRV_Destroy” to both run on server and multicast no difference
In my experience, swapping client controlled pawn and calling destroyed old pawn right after doesn’t work. I have to wait until client’s fully switch to the new pawn, then can server destroy the old pawn. And all other clients would see old pawn destroyed.
The code on pawn so that server can know when to destroy the old pawn.
There may be few frames where both new/old pawn would both exist on screen depending on network latency. The server can call an multicast function to set old pawn render/collision to nothing right after spawning new pawn.
you dont need to multicast DestroyActor its already replicated.
But this needs to run only on server, since it seems like a World Actor clients wouldnt have ownership to call RPCs anyway
what you need to do is put a SwitchHasAuthority on BeginOverlap so only the server runs it. But then you need to find a way to get the correct player controller otherwise it’ll only work for PlayerIndex(0)
Im not sure what you mean. Ive tried switch has authority but I’m not sure how that would change anything if the event was still run on server anyways. And my spawning is working just fine so I shouldn’t have to mess with the player controller index.