As title said, I want to tween the orientation of a part, however, from my understanding, Orientation needs a Vector3 value
CFrame.lookAt(pos1, pos2):ToOrientation gives one but it is described in Z Y X order
Even then, the error that arrives is that given type from ToOrientation is a ‘double’
Am I missing something? Is there a slight mistake?
Or should I approach this differently?
local partPos = part.Position
local object = MainBody
local info = TweenInfo.new(3, Enum.EasingStyle.Circular, Enum.EasingDirection.Out, 0, false, 0)
local ptable = {Orientation = CFrame.lookAt(MainBody.Position, partPos):ToOrientation()}
TweenService:Create(object, info, ptable):Play()
My bad about the variable mishap
As for the solution, my experience simply using CFrame is that it locks the object I want to tween in place, now looking back I feel like I should’ve specified that the object I want to be tweening will also be moving and will need to ‘track’ the player
Yet for a smoother rotation I had the idea of using tweens
Thank you so much!
I really should use Lerp much more
Not only did this make it way simpler but also gave me exactly the type of tracking I wanted.
I appreciate it a lot man, have a good one.