Why target variables have different values?

I want to do the possession in multiplayer. When i came near the car from the server or from the client the target takes different values.

Player Controllers are never the same object between server and client, even if it represents the same player. At least not in my experience, so unless you’re getting weird behavior this is probably okay.

Even though they are different objects they have the same connection via the Player though, which is why RPCs work through player controller and actually hit the correct player controller object on both sides.

I may have this wrong but when i treat it that way my network game works properly.

And what i need to do? I need that the server and the client can drive on the same car.

The possession happens (Possess event) only on the server so it doesn’t matter if the controller objects are different. They are replicated so even if the names differ the values are kept synchronized by the engine.

The server should automatically notify the client controller that the player pawn is changed and the above scheme should work.

Is there a specific problem coming out of this?

Thank you, I understood. I have error and warning that i dont know how to fix. Can you help me?
On the first and second picture ThirdPersonCharacter. On the third ThirdPersonGameMode.

You’re casting self (Character) to a player controller which is totally different, instead of self GetPlayerController > Cast to >> MyPlayerController.

Thanks, it fix the warning, but how to fix the error?

Get Game Mode > Cast to ThirdPersonGameMode > the result of the cast is the target in your event with the error.

Thank you! It helped.