Agressive npc ignores player who summoned it

I am currently scripting an npc which pathfinds to the nearest player within a certain radius of the summoner and attacks them. however, im stumped on how to make the pathfinding ignore the player who summoned it
local function attack(target)
local distance = (Demon.HumanoidRootPart.Position - target.HumanoidRootPart.Position).Magnitude
if distance > 3 then
^script which decides when to target somebody

if possible when you create the npc name it the same as the player who summoned it, so now when you loop thru all the players close to it you can check if npc.Name == Player.Name then continue end

Or additionally just create an attribute “Summoned” and check
if npc:GetAttribute(“Summoned”) == Player.Name then continue end