Npc head follow player on client

so im making a npc head turning thing that makes them look at the player but rn i can’t find anything that turns the head on the client and i want it on the client so that for one client the npc is looking at them but on another client the npc is looking at them instead.

You’ll just have to move your head follow code to the client, making it follow the client’s player, accessible via Players.LocalPlayer.

local PS = game:GetService("Players")
local RNS = game:GetService("RunService")

local targetHead: BasePart -- what you want to rotate towards the player

local player = PS.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local HRP: BasePart = char:WaitForChild("HumanoidRootPart")

RNS.RenderStepped:Connect(function()
	targetHead.CFrame = CFrame.lookAt(targetHead.Position, HRP.Position)
end)