Im trying to get the position of a damage instigator, but its just not working. Optimally, I want to get the position of an Elimanation Instigator, but that seems to not exists. Heres the code ive written so far, it teleports to a player on damage, but only the first player to join the world. It cant distinguish between the instigator and the damage reciver.
DoSwaglines(DamageResult : damage_result)<suspends> : void =
if:
Instigator := DamageResult.Instigator?
Agent := Instigator.GetInstigatorAgent[]
then:
if (PlayerList := GetPlayspace().GetPlayers(), FortniteCharacter := PlayerList[2].GetFortCharacter[]):
Rot := FortniteCharacter.GetViewRotation()
PlayerPosition : vector3 = FortniteCharacter.GetTransform().Translation
FollowerProp.MoveTo(PlayerPosition, rotation(Rot), 0.001)