How to Tween rotation so an instance looks at a player

            local direction = (targ.Parent.Head.Position - script.Parent.Head.Position).Unit
			local cframe =,direction)
			local x, y, z = cframe:ToEulerAnglesYXZ()
			local rotation =,0,0)
			local goal = {Orientation = rotation}

This is the code I have to do it, but it literally makes the NPCs fly up into the sky.

1 Like

Here’s what happens.

Tween the CFrame rather than just the orientation. takes two values, a vector and a lookAt.

Force them to look at your HumanoidRootPart or your head. Either should be fine.

EDIT: Roblox allows you to use “lookAt” more efficiently using CFrame.lookAt, which allows you to do what previously accomplished, just better.

Try that method instead.

Ohhhh. Thanks! I’ll try this and let you know if it works.

It worked! Thanks so much!! <3

1 Like

No worries! Glad I could help.