# \[Workaround\] Spectate a player after calling Respawn()

**URL:** <https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748>\
**Category:** Programming & Scripting\
**Tags:** workaround, fortnite-creative, unreal-editor-for-fortnite, respawn, fortnite\
**Created:** [April 3, 2024, 3:12am UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748 "2024-04-03T03:12:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Klian](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/klian/32/1207571_2.png) [@Klian](https://forums.unrealengine.com/u/Klian)\
**Post date:** [April 3, 2024, 3:12am UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/1 "2024-04-03T03:12:31Z")

</div>

As pointed out in many discussions on this forum:

> [@Unable to spectate a player after calling Respawn() on them](https://forums.unrealengine.com/t/unable-to-spectate-a-player-after-calling-respawn-on-them/1217521):
>
> Hey, I’m pretty sure it’s as simple as the title says, I remember having the issue when I tested on a very simple map and it’s still there, even on published islands. Basically, if a player respawns using the Respawn() function, nobody can spectate him afterwards. If the player was the last player from the opposite team, you can think that the team was eliminated and that the round should end even though there’s still someone alive. If there’s no one valid to spectate (everybody was respawned…

> [@Respawn() Does Not Respect Rotation Value](https://forums.unrealengine.com/t/respawn-does-not-respect-rotation-value/1485939/3):
>
> While we are at, can we also get the respawn fixed so the player returns to the actual playspace when revived if they are over their spawn limit?

> [@Agent.Respawn causes DBNO issue](https://forums.unrealengine.com/t/agent-respawn-causes-dbno-issue/1358694):
>
> Please select what you are reporting on: Unreal Editor for Fortnite What Type of Bug are you experiencing? Assets Summary View this video [https://youtu.be/WrRTwPmpgrc](https://youtu.be/WrRTwPmpgrc). Using the Respawn function on an agent in a team based mode messes up DBNO, and also as I have heard from 2 other creators, name tags (name tags will no longer be visible to team) Steps to Reproduce Watch the video and create a similar setup. Expected Result DBNO functions correctly Observed Result DBNO does not work corretly…

The Verse “Agent.Respawn()” function is severely bugged and it will prevent many actions after a player’s been respawned using it.  
I’ve been recently contacted by a creator which needed help because if a player’s been respawned using the Respawn() function, nobody can spectate him.

Instead of charging him for **something Epic hasn’t been able to solve yet** , here’s a my workaround everybody can use.

# Island Settings

1. Set Respawn Type to “Wave”, this is not strictly needed but it may be useful if all players are supposed to spawn at the same time
2. Set “Only Allow Respawn if Spawn Pads Found” as true
3. Set Spawn Limit off since we’ll need infinite respawns
4. Set Respawn Time to “1.0”, which is the minimum you can set
5. Set Override Spawn Immunity Time as true, and Spawn Immunity Time to “0.0”

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/f/cdff993f1a2e1759b129f72e5a27e2366d0b38f3.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/e/f9e4cd1cc8ed92b01e7eeea2466f27d023592f06.png)

# Spawn Pads

1. Add one or more Spawn Pad for each team you’ll have in your game.
2. If your gamemode is based on teams (like 2v2 for example) remember to add the right amount of pads for each team.
3. Leave their settings as default, but change the Team Index

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/f/51fd205ee6a986e95fbdf06077e049869afa1618.jpeg)

# Creative Device (Verse)

```auto
instant_respawn_device := class(creative_device):
    @editable
    RespawnTrigger : trigger_device = trigger_device{}
    @editable
    PlayerSpawnDevices : []player_spawner_device = array{}

    <# Standard OnBegin event #>
    OnBegin<override>()<suspends>:void=
        # Exposing the "RespawnAll" event with a trigger device, replace this with your own method or just call it using Verse
        RespawnTrigger.TriggeredEvent.Subscribe(RespawnAll)

        Sleep(1.0)
        for(SpawnDev : PlayerSpawnDevices):
            SpawnDev.SpawnedEvent.Subscribe(AgentRespawned)
        # Disable all respawns (the function is including a 1 sec delay, so all the initial player are spawned correctly when the game starts)
        DisableRespawns()

    <# Used to subscribe the actual RespawnAll function, which is async #>
    RespawnAll<public>(MaybeAgent : ?agent):void=
        spawn{PostRespawnAll()}

    <# Respawn process #>
    PostRespawnAll<public>()<suspends>:void=
        Sleep(1.0)

        # Enable all the spawnpads
        for(SpawnDev : PlayerSpawnDevices):
            SpawnDev.Enable()

        # Check each player present in the game
        for(Player : GetPlayspace().GetPlayers(), not Player.GetFortCharacter[].IsActive[]):
            # Respawn the player somewhere, it's not important since it will get eliminated and respawned on an actual pad
            Player.Respawn(vector3{Z := 512.0}, rotation{})
            # Wait
            Sleep(0.01)
            # Eliminate the player's character once again, this will trigger the automatic respawn action on those pads we've just enabled
            if(PChar := Player.GetFortCharacter[]):
                PChar.SetVulnerability(true)
                Sleep(0.01)
                PChar.Damage(damage_args{Amount := 999999999.0, Instigator := option{PChar}, Source := option{PChar}})    

    <# Each time someone respawns, check if pads can be disabled #>
    AgentRespawned(Agent : agent):void=
        var bCanDisableSpawnPads : logic = true
        for(Player : GetPlayspace().GetPlayers(), not Player.GetFortCharacter[].IsActive[]):
            set bCanDisableSpawnPads = false

        if(bCanDisableSpawnPads?):
            DisableRespawns()
    
    <# Disable all pads #>
    DisableRespawns<public>():void=
        # Disable all the pads in use
        for(SpawnDev : PlayerSpawnDevices):
            SpawnDev.Disable()

```

After building the Verse code, add the device into your scene and make sure to all your Spawn Pads to its list.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/e/a0ed61dc5b32253e1a76c1efdd53f0ebdb655257.jpeg)

# Considerations

## Elimination count

Since this process will force respawn by spawning and eliminating the player, you should consider this step if you have something like a ranking system, or an “Eliminated” tracker device, so make sure to remove 1 “Eliminated” count each time you use it.

## Double elimination on screen

Looking at the result, it’s pretty obvious that the player’s being eliminated and then respawned. You can mask the process, for example, by adding a black screen while the function is doing its things.

## Further improvements

This is the generic solution you might want to use, but there’s still room for improvements and adaptations depending on your project setup.

# Result

[Video](https://youtu.be/mat__J0Q3eA)

# Contacts

If you’ve found this workaround useful, consider following me on 𝕏: [@kliansenpai](https://twitter.com/kliansenpai)

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [April 3, 2024, 8:18am UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/2 "2024-04-03T08:18:04Z")

</div>

Nice one, thanks for sharing, I’m kinda using this method for respawning now but no way I could do a tutorial on it since it’s so random

Hope Epic goes by and understand how much of an hassle it is

Also, did you try your version in Public since the spawn immunity time gets overriden ?

---

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [April 3, 2024, 5:56pm UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/3 "2024-04-03T17:56:50Z")

</div>

Does this fix the DBNO issue because I thought you had to switch class as well and eliminate on switch

---

<div class="post-metadata">

**Author:** ![Klian](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/klian/32/1207571_2.png) [@Klian](https://forums.unrealengine.com/u/Klian)\
**Post date:** [April 3, 2024, 6:24pm UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/4 "2024-04-03T18:24:10Z")

</div>

Yeah exactly! It’s crazy we have to invent such elaborate shenanigans to solve issues which have been present for almost a whole year…  
The public version of the map will be available this weekend, so if any issue comes out I will update the guide accordingly, I didn’t know the spawn immunity time might have problems too 🤯.

Also, the map using this solution doesn’t rely on the DBNO device, so I don’t really know if it might solve that issue too. Theoretically, it’s respawning the player using the pad, so it should reset the agent state, but I can’t confirm for now!

---

<div class="post-metadata">

**Author:** ![freeearn55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@freeearn55](https://forums.unrealengine.com/u/freeearn55)\
**Post date:** [April 7, 2024, 12:06pm UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/6 "2024-04-07T12:06:53Z")

</div>

I have a problem with this script, I don’t spawn in the player spawner and spawn in a random place did you know how can i fix this problem?

---

<div class="post-metadata">

**Author:** ![Klian](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/klian/32/1207571_2.png) [@Klian](https://forums.unrealengine.com/u/Klian)\
**Post date:** [April 7, 2024, 8:46pm UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/7 "2024-04-07T20:46:27Z")

</div>

There was indeed an issue with the code, but it was related to the time needed for the pads to respawn all player. So instead of using a generic Sleep() function, I binded the respawn event of each pad to check if all players’ve been respawned. If so, the new code will disable each spawn.

> [@\[Workaround\] Spectate a player after calling Respawn()](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/6):
>
> I have a problem with this script, I don’t spawn in the player spawner and spawn in a random place did you know how can i fix this problem?

If everything is setup correctly, your players should respawn on the pads. Did you setup the respawn location correctly in the Island Settings?

---

<div class="post-metadata">

**Author:** ![freeearn55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@freeearn55](https://forums.unrealengine.com/u/freeearn55)\
**Post date:** [April 11, 2024, 7:42pm UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/8 "2024-04-11T19:42:11Z")

</div>

yes, the settings are done well, but I don’t know why this is happening…

---

<div class="post-metadata">

**Author:** ![GAWDDAMAGE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GAWDDAMAGE](https://forums.unrealengine.com/u/GAWDDAMAGE)\
**Post date:** [April 27, 2025, 10:10pm UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/9 "2025-04-27T22:10:49Z")

</div>

one year later still having issues with .respawn() !!!

---

<div class="post-metadata">

**Author:** ![M1racLe\_Boy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/m1racle_boy/32/1043174_2.png) [@M1racLe\_Boy](https://forums.unrealengine.com/u/M1racLe_Boy)\
**Post date:** [March 9, 2026, 4:21pm UTC](https://forums.unrealengine.com/t/workaround-spectate-a-player-after-calling-respawn/1784748/10 "2026-03-09T16:21:53Z")

</div>

Another year has passed and .respawn still has problems (for example, with the ignored barriers for player after call .Respawn).
