# RemovePlayer not working on client

**URL:** <https://forums.unrealengine.com/t/removeplayer-not-working-on-client/355095>\
**Category:** Blueprint\
**Tags:** bug, unreal-engine, Blueprint, question\
**Created:** [April 22, 2016, 3:45pm UTC](https://forums.unrealengine.com/t/removeplayer-not-working-on-client/355095 "2016-04-22T15:45:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matfer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@matfer](https://forums.unrealengine.com/u/matfer)\
**Post date:** [April 22, 2016, 3:45pm UTC](https://forums.unrealengine.com/t/removeplayer-not-working-on-client/355095/1 "2016-04-22T15:45:04Z")

</div>

(source build 4.11.0)

Blueprint node RemovePlayer works on server but not on client.

To reproduce the problem:

- create project from blueprint ThirdPerson template
- open level blueprint and add this:

 ![87994-remove_player_bug.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/8/da8ce76be53cce66d96d77e29a4dc5393b168c1f.jpeg)

- set “Number of players” to 2 and launch play in editor
- client screen gets split when CreatePlayer is executed, but the player is not removed and the screen stays split when RemovePlayer is executed

The result is the same even if Destroy Pawn is unchecked. The code works correctly if executed on the server (i.e. at the end the added player is removed and the screen is no more split). Delays are just to see the effects of single nodes, removing them the result is the same.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [April 22, 2016, 6:19pm UTC](https://forums.unrealengine.com/t/removeplayer-not-working-on-client/355095/2 "2016-04-22T18:19:20Z")

</div>

Hello matfer,

I was able to reproduce this issue on our end using the setup shown above. However, the issue appears to be with the return value of the create player node. I have written up a report ( UE-29832) and I have submitted to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for you time and information.

Example of workaround:

In this workaround I provide the player controller at index 1 (meaning the second player added) to the removed player manually. I hope that this information helps.

![88000-removeplayerhelp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/1/fd10c13757d566ee8bd5bf5011b46406944019a2.png)

Make it a great day

---

<div class="post-metadata">

**Author:** ![matfer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@matfer](https://forums.unrealengine.com/u/matfer)\
**Post date:** [April 22, 2016, 9:56pm UTC](https://forums.unrealengine.com/t/removeplayer-not-working-on-client/355095/3 "2016-04-22T21:56:52Z")

</div>

Thank you for your answer. I tried the workaround exacly as you described and it worked, but I ran into other two issues:

1 - The code of your workaround did not work on the server, but it worked after I put 2 as player index in GetPlayerController, so it seems that the newly created player takes index 2. Maybe this is not exacly an issue, but I wonder why this happens.

2 - Using your code on the client, re-running CreatePlayer after running RemovePlayer crashes the editor with this message:

> Fatal error:  
> [File:E:\UE4\UnrealEngine\Engine\Source\Runtime\Engine\Private\NetConnection.cpp]  
> [Line: 1712] Failed to find  
> LocalPlayer for received  
> PlayerController

To avoid misunderstandings, this is the code:

![88057-create_player_crash.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/c/e0c71db333f65fc686dfde21a77cdf7870232b03.png)

To reproduce run pie and in the client press F and then G.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [April 26, 2016, 2:41pm UTC](https://forums.unrealengine.com/t/removeplayer-not-working-on-client/355095/4 "2016-04-26T14:41:44Z")

</div>

Hello matfer,

I will need you to create a new thread for the crash that you are reporting for tracking purposes because it is a separate issue. After creating a new thread please feel free to post a link in the reply here and I will be happy to assist you further.
