# Calling Pawn client method on an unpossessed pawn

**URL:** <https://forums.unrealengine.com/t/calling-pawn-client-method-on-an-unpossessed-pawn/796719>\
**Category:** Programming & Scripting\
**Tags:** Networking, rpc, unreal-engine, CPP, question\
**Created:** [March 22, 2023, 4:04pm UTC](https://forums.unrealengine.com/t/calling-pawn-client-method-on-an-unpossessed-pawn/796719 "2023-03-22T16:04:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaidenlessUndead](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaidenlessUndead](https://forums.unrealengine.com/u/MaidenlessUndead)\
**Post date:** [March 22, 2023, 4:04pm UTC](https://forums.unrealengine.com/t/calling-pawn-client-method-on-an-unpossessed-pawn/796719/1 "2023-03-22T16:04:55Z")

</div>

When I enter a vehicle I’m unpossesing a player character and possessing a vehicle. After that i’m calling a player pawn client method to update UI. For some reason on an unpossessed pawn the client method is only called on a server.  
To fix that I can first unpossess vehicle, posses player execute client method and then unpossess player and possess vehicle again. But it looks really bad. Is there other way around? Why client methods aren’t working on an unpossessed pawn?

---

<div class="post-metadata">

**Author:** ![MaidenlessUndead](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaidenlessUndead](https://forums.unrealengine.com/u/MaidenlessUndead)\
**Post date:** [March 22, 2023, 6:32pm UTC](https://forums.unrealengine.com/t/calling-pawn-client-method-on-an-unpossessed-pawn/796719/2 "2023-03-22T18:32:29Z")

</div>

Here is a pseudocode of how it looks now

```auto
void AMyVehicle::ServerPlayerEnterVehicle_Implementation()
{
//do something
Controller->Possess(MyCharacter);
MyCharacter->ClientMethodThatUpdatesUI();
Controller->Possess(MyVehicle);
}

```

Is there a way to call a client method without AController class taking a possession of AMyCharacter?

---

<div class="post-metadata">

**Author:** ![MaidenlessUndead](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaidenlessUndead](https://forums.unrealengine.com/u/MaidenlessUndead)\
**Post date:** [March 25, 2023, 6:37am UTC](https://forums.unrealengine.com/t/calling-pawn-client-method-on-an-unpossessed-pawn/796719/3 "2023-03-25T06:37:18Z")

</div>

Found the solution myself. Moved all the UI logic from pawn to player controller that way all the client methods work even if pawn is unpossessed. I don’t know if there is a better solution but moving client methods to the player controller works.
