Look transition between 2 objects

Hello, you probably did not get the title right, let me explain.
I want to make a smooth transition to make NPC’s head look from object1 to object2. I highly believe I need to use advanced mathematical functions but I am not really sure which one and how would I use it.

Thank you for any reply and help! Have a great day and stay safe.

If you don’t understand then make sure to tell me!

1 Like

You’d want to use TweenService and CFrames
Ex

local TweenService = game:GetService("TweenService")
local startCFrame = CFrame.new() -- If you don't know what CFrames are be sure to look at the article and some tutorials they are pretty complex
local endCFrame = startCFrame * CFrame.Angles(0,3,0)

local TestPart = Instance.new("Part") -- make a new part
TestPart.Parent = workspace
TestPart.CFrame = startCFrame

local TweenInformation = TweenInfo.new(1,Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0) -- I put the article for TweenInfo at the bottom be sure to read it

local Tween = TweenService:Create(TestPart, TweenInformation, {CFrame = endCFrame})
-- The first argument is the object you want to tween the second is the tweeninfo and the third is a table of properties you want to tween
Tween:Play() -- Run the tween

Heres the article on TweenInfo

Okay, I understand tweeninfo, cframes too… But I dont want the head to add to it’s CFrame Y angle + 3 but I want to change the whole CFrame angles to smoothly change so it will look from part1 to part2