# Struggling to move prop thats following player

**URL:** <https://forums.unrealengine.com/t/struggling-to-move-prop-thats-following-player/2511665>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [May 15, 2025, 3:36pm UTC](https://forums.unrealengine.com/t/struggling-to-move-prop-thats-following-player/2511665 "2025-05-15T15:36:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SUSRI](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/susri/32/1042822_2.png) [@SUSRI](https://forums.unrealengine.com/u/SUSRI)\
**Post date:** [May 15, 2025, 3:36pm UTC](https://forums.unrealengine.com/t/struggling-to-move-prop-thats-following-player/2511665/1 "2025-05-15T15:36:44Z")

</div>

Im struggling to move my prop that follows the player?

Every time I change the X value within my script, weather its a float or with a variable, if its larger than 0.0 it breaks and no longer raises and lowers my prop on the Z axis.

```
    UpMovementKeyFrame: keyframe_delta = keyframe_delta
    {
        DeltaLocation := vector3{ X := 0.0, Y := 0.0, Z := 30.0 } 
        DeltaRotation := IdentityRotation()
        DeltaScale := vector3{ X := 1.0, Y := 1.0, Z := 1.0 } 
        Time := 0.85
        Interpolation := Ease
    }  
    DownMovementKeyFrame: keyframe_delta = keyframe_delta
    {
        DeltaLocation := vector3{ X := 0.0, Y := 0.0, Z := -30.0 } 
        DeltaRotation := IdentityRotation()
        DeltaScale := vector3{ X := 1.0, Y := 1.0, Z := 1.0 }
        Time := 0.85
        Interpolation := Ease
    }

    set IdleAnimationKeyFrames = array{ UpMovementKeyFrame, DownMovementKeyFrame }
    
    GetPlayspace().PlayerRemovedEvent().Subscribe(OnPlayerLeft)

```

loop:  
Sleep(SleepTime)  
for (Player : GetPlayspace().GetPlayers(), AgentData := AgentMap[Player],  
PetPropTuple := AgentData.OwnedPets[AgentData.ActivePetIndex], FortCharacter := Player.GetFortCharacter):  
PetProp: creative\_prop = PetPropTuple(0)  
PetLoc: vector3 = PetProp.GetTransform().Translation  
PlayerLoc: vector3 = FortCharacter.GetTransform().Translation  
DistanceToPlayer: float = Distance (PetLoc, PlayerLoc)

```
            if (DistanceToPlayer > FollowDistance):
                if (Direction := (PlayerLoc - PetLoc).MakeUnitVector[]):
                    DistanceToTravel: float = DistanceToPlayer - WaitDistance
                    var LocationToTravel : vector3 = PetLoc + (Direction * DistanceToTravel)
                
                    set AgentData.bPetPlayingAnim = false
                    if (PropAnimController := PetProp.GetAnimationController[]):
                        PropAnimController.Stop()

                    PlayerRotation := FortCharacter.GetTransform().Rotation 
                    spawn{PetProp.MoveTo(LocationToTravel, PlayerRotation, SleepTime)}
        
            else:
                if (AgentData.bPetPlayingAnim = false):
                    set AgentData.bPetPlayingAnim = true
                    if (PropAnimController := PetProp.GetAnimationController[]):
                        PropAnimController.SetAnimation (IdleAnimationKeyFrames, ?Mode := animation_mode.Loop) 
                        PropAnimController.Play()

```

---

<div class="post-metadata">

**Author:** ![SUSRI](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/susri/32/1042822_2.png) [@SUSRI](https://forums.unrealengine.com/u/SUSRI)\
**Post date:** [May 15, 2025, 4:42pm UTC](https://forums.unrealengine.com/t/struggling-to-move-prop-thats-following-player/2511665/2 "2025-05-15T16:42:20Z")

</div>

I added this to the bttom:

if (DistanceToPlayer \> FollowDistance):  
if (Direction := (PlayerLoc - PetLoc).MakeUnitVector):  
DistanceToTravel: float = DistanceToPlayer - WaitDistance  
var LocationToTravel : vector3 = PetLoc + (Direction \* DistanceToTravel)  
set LocationToTravel.X = StoreNumber \* 50.0

Which works with the animation and makes them move up and down but now they only follow me on a certain axis

---

<div class="post-metadata">

**Author:** ![SUSRI](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/susri/32/1042822_2.png) [@SUSRI](https://forums.unrealengine.com/u/SUSRI)\
**Post date:** [May 15, 2025, 4:43pm UTC](https://forums.unrealengine.com/t/struggling-to-move-prop-thats-following-player/2511665/3 "2025-05-15T16:43:53Z")

</div>

my storenumber will be in increments of 1 as to make it so the pest fly in seperate pos on each store and dont collide in the same x and y
