Hello developers, im currently working on a system where i would like to tween the humanoidrootpart to look at a certain position. I already have the code to change the cframe but when i implement it into a tween, nothing happens
Here is the code:
game:GetService("TweenService"):Create(hrp, TweenInfo.new(0.3, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out), {CFrame = CFrame.new(hrp.Position, Vector3.new(lookto.X, hrp.Position.Y, lookto.Z))}):Play()
hrp represents the npcs humanoidrootpart and the lookto respresents the position of a player that i want the npc to look at.