# Multiplayer Respawn Problem

**URL:** <https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663>\
**Category:** Multiplayer & Networking\
**Tags:** tps, unreal-engine, respawn, Multiplayer, question\
**Created:** [September 28, 2017, 2:19pm UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663 "2017-09-28T14:19:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![HakanErunsal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HakanErunsal](https://forums.unrealengine.com/u/HakanErunsal)\
**Post date:** [September 28, 2017, 2:19pm UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663/1 "2017-09-28T14:19:27Z")

</div>

Hello, I am having some problem with multiplayer respawning player on death. So I have a function in Game Mode takes care of the respawn, here;

 ![215035-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/4/d241d36fe42ec25d170f881d456a79d3decfa5b9.jpeg)

And in Game Player Controller I have another script called Respawn Request, which calls the function in the game mode. here;

 ![215036-screenshot-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/c/12c7645a5ac188882deec9ddfd0a3fb812dc11c1.png)

And, I call this function in the player controller, in the actual player when he is dead.

 ![215039-screenshot-4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/9/0f9c349c8dac92a5de59c747bbf858f9047a8a6f.jpeg)

So the problem is, as you can see I binded X to respawn as well. For debugging. When I press X, server player and client respawning themselves which is totally fine. But when I shoot one with the other, the problem begins. If client shoots server, server gets respawned, which is what I want. But if server shoots client, server himself again gets respawned.

So I dont understand why X key is working fine on respawning but when I call it on damage it doesnt work fine. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![vorixo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vorixo/32/918682_2.png) [@vorixo](https://forums.unrealengine.com/u/vorixo)\
**Post date:** [September 28, 2017, 4:05pm UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663/2 "2017-09-28T16:05:23Z")

</div>

Do not use GetPlayerController(0). Instead use

![215052-7023f7bb5d582454eefba788ed1c3b02.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/a/07a86b4f22e26d2ad49dc53a9b99b1294301da1d.png)

---

<div class="post-metadata">

**Author:** ![carlosasb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@carlosasb](https://forums.unrealengine.com/u/carlosasb)\
**Post date:** [September 28, 2017, 5:05pm UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663/3 "2017-09-28T17:05:00Z")

</div>

From the pictures you posted, it seems the problem might be that your Respawn event in your PlayerController class is is a server only event. The server always has the PlayerIndex = 0, when you are a listen server. So when you are using your event only on server it always gets the server PlayerController. For a dedicated server it is similar. you are always getting the first player.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![HakanErunsal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HakanErunsal](https://forums.unrealengine.com/u/HakanErunsal)\
**Post date:** [September 29, 2017, 7:41am UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663/4 "2017-09-29T07:41:16Z")

</div>

That solved the problem. Even if I put Get Player Controller instead of Self, it goes back to the same problem again. Get Controller and Self are working fine.

---

<div class="post-metadata">

**Author:** ![vorixo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vorixo/32/918682_2.png) [@vorixo](https://forums.unrealengine.com/u/vorixo)\
**Post date:** [October 2, 2017, 12:21am UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663/5 "2017-10-02T00:21:11Z")

</div>

Could you please accept my reply as the answer cliking on the green icon? Thanks!

---

<div class="post-metadata">

**Author:** ![FWEDY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FWEDY](https://forums.unrealengine.com/u/FWEDY)\
**Post date:** [February 2, 2022, 5:58pm UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663/6 "2022-02-02T17:58:44Z")

</div>

Do you remember what it was? I’m having this problem also but i cant see the picture.

---

<div class="post-metadata">

**Author:** ![vorixo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vorixo/32/918682_2.png) [@vorixo](https://forums.unrealengine.com/u/vorixo)\
**Post date:** [February 2, 2022, 6:12pm UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663/7 "2022-02-02T18:12:06Z")

</div>

Hello! Yes, If I recall correctly it was the “GetController” node. Although this might not solve it for you. If you still have issues I recommend you to create another post in a.h. with your problem. Regards.

---

<div class="post-metadata">

**Author:** ![FWEDY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FWEDY](https://forums.unrealengine.com/u/FWEDY)\
**Post date:** [February 2, 2022, 6:59pm UTC](https://forums.unrealengine.com/t/multiplayer-respawn-problem/405663/8 "2022-02-02T18:59:23Z")

</div>

Thanks! I figured it out, GetController did not work for me so I did Get all Actors of class player controller and a for loop to check if it == get player controller with a branch. for some reason this worked for me but not get player controller, weird.
