How to make an NPC rotate towards the player locally

I tried doing this earlier but it only works after waiting a few minutes and it’s not a good method.

while wait() do
	local player = game.Players.LocalPlayer
	local character = player.Character or player.CharacterAdded:Wait()
	script.Parent.Guardian:MoveTo(character:WaitForChild("HumanoidRootPart").Position)
end

Thank you for helping

1 Like

Try to move the local script in startergui, and specify the location of the NPC in workspace.Guardian.

How exactly do you mean rotate, if you mean only the rotation like an eye, you can use CFrame.lookat(From, To)