# Need Assistance with Target Switching in Verse Script for Prop Follow

**URL:** <https://forums.unrealengine.com/t/need-assistance-with-target-switching-in-verse-script-for-prop-follow/1958116>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [August 1, 2024, 1:42pm UTC](https://forums.unrealengine.com/t/need-assistance-with-target-switching-in-verse-script-for-prop-follow/1958116 "2024-08-01T13:42:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamKuff](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/iamkuff/32/976553_2.png) [@iamKuff](https://forums.unrealengine.com/u/iamKuff)\
**Post date:** [August 1, 2024, 1:42pm UTC](https://forums.unrealengine.com/t/need-assistance-with-target-switching-in-verse-script-for-prop-follow/1958116/1 "2024-08-01T13:42:30Z")

</div>

**Hello everyone,**

**I’m currently working with a Verse script for a creative device in Fortnite. The goal is to have a prop follow the player who triggers a bomb device. If another player triggers the bomb, the prop should stop following the original player and start following the new player, effectively passing the “hot potato.”**

Script:  
using { /Fortnite.com/Devices }  
using { /Fortnite.com/Characters }  
using { /Verse.org/Simulation }  
using { /UnrealEngine.com/Temporary/Diagnostics }  
using { /UnrealEngine.com/Temporary/SpatialMath }

# A Verse-authored creative device that can be placed in a level

bomb\_logic\_new := class(creative\_device):

```
@editable PropFollow : creative_prop = creative_prop{}
@editable BombTrigger : trigger_device = trigger_device{}

# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
    BombTrigger.TriggeredEvent.Subscribe(Triggerit)

Triggerit(InPlayer:?agent):void=
    AllPlayers := GetPlayspace().GetPlayers()
    if (Player := AllPlayers[0], Agent := agent[Player], Fort := Agent.GetFortCharacter[]):
        Fort.SprintedEvent().Subscribe(OnMoved)
        spawn:
            UpdateCharacter(Fort, vector3{Z:=-90.0, Y:=-0.0})

UpdateCharacter(Player : fort_character, Offset : vector3)<suspends>:void=
    loop:
        Sleep(0.0)
        NewPos := Player.GetTransform().Translation + Offset
        if (PropFollow.TeleportTo[NewPos, Player.GetTransform().Rotation]) {}

OnMoved(MoveData : tuple(fort_character, logic)):void=
    if (Agent := MoveData(0).GetAgent[]):
        if (MoveData(1)?):
        else:

```

### What I Need Help With:

- Verifying if my current method for subscribing to player events is correct.
- Best way for unsubscribing from the previous player’s events and subscribing to the new player’s events.
- Any other suggestions

Thank you in advance for your help!
