Download

Client Side Pawn Possess does not possess the Spawned Pawn

I am trying to possess a Character that Client picked in the menu on the same Level, however, it asks for HasAuthority() check to make it legal to execute.
When I do use HasAuthority() nothing happens, part of the code with Character Possession never gets executed.

Anyone got any idea on how to proceed with this?

If this inherits from GameInstance then that is why the Server RPC is failing.
The GameInstance class can´t be replicated.

You should move the character selection or at least the RPC to the PlayerController class.

1 Like

Thank you for the reply! Quick follow-up question:
Isn’t the PlayerController also not replicated?

PlayerControllers are replicated they just ONLY replicate to the owner. This means that the Owner can send Server RPC´s and the Server can send Client RPC´s. What you can´t do is send NetMulticast RPC´s since only the Owner and the Server has the Object, no one else.

1 Like

Ooooh, got it. That makes sense.
I will try the suggested fix and come back with the result.

Hey this works like a charm! Thank you so much!

For anyone having same or similar issue: I moved all the Character Selection logic into custom PlayerController rather than having it in the GameInstance as @GarnerP57 suggested and that did the job.

Consider using PlayerState for this instead.

Why?
Playerstate is meant for replicating properties between players and this is a function that just want to let the server know what character the client has picked. The other clients don´t need to know.