Try changing your GrantVisualEffect function to this!
GrantVisualEffect(Agent : agent) : void=
if (Player := Agent):
PlayerVisualEffect.Pickup(Player)
I dont think it’s possible for the PlayerSpawner SpawnedEvent to return without a Player/Agent (I’m not sure which it returns!), so it’s not necessary to use a ?
(This is my first time attempting to help someone here! I don’t know too much and I could be wrong, good luck though!)