Possessing Pawn Multiplayer

Hey, So Im trying to possess a pawn in multiplayer, Client 1 is calling the possess node through a “run on server” custom event, but it does not possess the pawn until I go onto the server and run the possess node directly from there, I have no clue as to why it doesnt work, All help is appreciated thanks!!

Can you post screen shots of your blueprints?

This is wrong because Player Array is returning player states that are in different order for everyone. What you need to do is when you call your custom event on client, you need to pass the controller as a parameter.
Even better solution is to have all your Run on Server functions in your PlayerController, since it has an owning client, and server can understand who did the remote call.

TL;DR


  1. You need Custom event that takes PlayerController as a parameter
  2. This event is Run on Server

for the player array I just left it as 0 for rn but I also change that number dinamacly based on what character I want to possess, anyways, Ive tried many different ways to possess the pawn and this is one other way im trying

Ive also tried it with the “switch authority node” and running that on server only but nothing seems to work unless I actually run it on the server

Im running this all on the playercontroller, Ive tried getting the “Get player controller”, since its 0 for all clients from my understanding, only different on the server end, or getting reference to self as well. But that doesnt work either, or how exactly do you mean as a parameter?

I’m not at PC, custom even can have a parameter. So you pass the controller of client, to the server, and server uses it to possess.