Damage an agent to put them to spectator

Is there a way to damage an Agent without using a creative Device. I am trying to make a newly joined player go into spectator by eliminating them if they join in round 2.

Ah I found it

using { /Fortnite.com/Characters }
DamagePlayer(Inagent: agent): void =
        if(fortcharacter:= Inagent.GetFortCharacter[]):
            fortcharacter.Damage(5.0)
1 Like