CFrame.lookAt is not working

local look = script.Parent.HumanoidRootPart.CFrame
for i = 1, 180, .25 do
	look = CFrame.lookAt(look.Position,Vector3.new(look.Position.X,i,look.Position.Z))
	wait(.1)
end

Nothing happens whatsoever, there are no errors. The formatting is perfect.

Do you mean to update the CFrame of ‘HumanoidRootPart’? Because what you have right now is only changing a variable.

local look = script.Parent.HumanoidRootPart.CFrame
for i = 1, 180, .25 do
	script.Parent.HumanoidRootPart.CFrame = CFrame.lookAt(look.Position,Vector3.new(look.Position.X,i,look.Position.Z))
	wait(.1)
end
2 Likes