I am making a game and Im using cframe.lookat to make the npc look at the character, the head has small, red, neon balls as children of the head but when I move the head using the script below it doesn't move the eyes with it.
RunService = game:GetService("RunService")
game.Players.PlayerAdded:Wait()
plr = game.Players:GetChildren()
for _, Player in plr do
plr = Player
break
end
character = plr.Character or game.Players[plr.Name].CharacterAdded:Wait()
game.Workspace:WaitForChild("NPC")
print("HERE")
RunService.Heartbeat:Connect(function()
local npcPosition = game.Workspace.NPC.Head.Position
local targetPosition = plr.Character.Head.Position
task.wait()
game.Workspace.NPC.Head.CFrame = CFrame.lookAt(game.Workspace.NPC.Head.Position, targetPosition)
end)

2 comments
Yes thank you but now i'm trying to use collection service to make a lot of them look at the character at once but i cant figure out how.
You mean multiple NPCs looking at the same person?