function Path.GetNearestCharacter(G)local n,Q=nil,math.huge for H,g in ipairs(Players:GetPlayers())do if g.Character and(g.Character.PrimaryPart.Position-G).Magnitude<Q then n,Q=g.Character,(g.Character.PrimaryPart.Position-G).Magnitude end end return n end
--[[ STATIC METHODS ]]
--
function Path.GetNearestCharacter(fromPosition)
	local character, dist = nil, math.huge
	for _, player in ipairs(Players:GetPlayers()) do
		if player.Character and (player.Character.PrimaryPart.Position - fromPosition).Magnitude < dist then
			character, dist = player.Character, (player.Character.PrimaryPart.Position - fromPosition).Magnitude
		end
	end
	return character
end
