How would I find the difference between 2 CFrame angles?

Hello devforum, I am struggling with an issue with finding the difference between 2 CFrame angles.

local RotChange = CFrame.Angles(Vb.CFrame.Rotation.X - V.CFrame.Rotation.X,Vb.CFrame.Rotation.Y - V.CFrame.Rotation.Y,Vb.CFrame.Rotation.Z - V.CFrame.Rotation.Z)
Part.CFrame *= CFrame.Angles(RotChange.X*i,RotChange.Y*i,RotChange.Z*i)

I have tried many things to find a CFrames angle, let alone subtract it from another. I made this diagram to show what I mean:


Any help is appreciated.

3 Likes

Not sure it will help but here is a similar topic:

and this one:

1 Like

That’s orientation, I’m looking for CFrame.

1 Like

I think the second one answers that at the bottom.

1 Like

math.deg(math.acos(CFrame1.lookvector:Dot(CFrame2.lookvector)))

3 Likes

This returns a number, I’m looking for something that returns a CFrame.Angles.

CFrame1.Rotation:ToObjectSpace(CFrame2.Rotation):ToOrientation()

4 Likes

Thank you so much! It worked!!!