I’m making a script where there are multiple parts that rotate to face the character.
Right now, the script is working. But it only works for one of the parts. I know why; it’s because of the infinite loop. The problem is that I don’t know how to fix it.
for i, v in pairs(TaggedNPCs) do
local partPos = v.Position
while RunService.RenderStepped:Wait() do
v.CFrame = CFrame.new(partPos, hum.Position)
end
end
I suppose I need to put the RunService loop outside of the for loop. But I don’t know how or where. Any help is appreciated.