Checking if players are close to NPCs

I’m starting to code the AI for my game, both friendly NPCs and aggressive NPCs. Both interact with the player as they come near.

Is it better to check on the client if the player is close to an NPC and then fire a remote if they are. Or should I have the server iterate through all players, cache their positions and then do comparisons for each NPC?

local Players = game:GetService("Players")
local NPCs = game:GetService("NonPlayerCharacters")

Players.PlayerAdded:Connect(function(player)
  player.CharacterAdded:Connect(function(character)
    character:WaitForChild("HumanoidRootPart")

    character.HumanoidRootPart.Touched:Connect(function(part)
      if part:IsDescendantOf(NPCs) then
        print(player.Name .. " is close to an NPC!")
      end
    end)
  end)
end)

That would mean that a player has to touch them to interact.

I am wanting if a player goes near an enemy (e.g. a zombie), I want that to be detected before they even touch them.

In this case, you would have to use the Magnitude property