in the if statement you’re not testing anything
i assume you wanna test if agent is a player so i would write it as
# tests if agent is a player. typecast Agent to player
# if the cast is successful then grant the powerup
if (Player := player[Agent]):
PlayerVisualEffect.Pickup(Player)