UE4 Widget not firing server-side event properly

So I am creating a system for my game to use replication and I recently started working on a “Disconnect” button for the menus a player has access to when they hit START. Inside the widget blueprint, an event is supposed to fire that will trigger a custom event to happen in the Game State on the server side. It looks something like this:


The problem I am having is that the GS_Disconnect_Handler only ever happens when the replication for the event is set to Run on owning client or multicast. Never when it is set to Run on Server.

Basically, I am just trying to get the client to send a request/trigger to the server to disconnect and wipe their data. Multicast KIND OF worked, but everything would only ever happen client side. They would still be there on the server side.

What am I missing? Any/all help would be very much appreciated. Thank you! :slight_smile:

You are missing the fact that GameState isn’t a client-owned actor, thus you can’t fire server/client RPCs from it. Supposing you’re firing the client RPC from client, then it’s executing locally as a normal function, with no warnings. For a server RPC, you will be getting a warning "LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor..." which means that the RPC is being absorbed (not executed at all). The only meaningful RPC you can run from GameState is a multicast RPC.

The client-owned actors are: PlayerController, PlayerState, and Pawn in case it’s possessed.