I am trying to do a for loop that’s loops trough a folder containing NPC so I can update them but the code below is not working and can’t figure out why all the NPC’s are in the npc folder.
for i, otherPlayer in pairs(game.Workspace.npc) do
local otherChar = otherPlayer.Character
if otherPlayer ~= plr then
if otherChar and otherChar:FindFirstChild("HumanoidRootPart") and char:FindFirstChild("HumanoidRootPart")