How to get a CFrame's angles

As @Crazyman32 said, you likely just want to get the rotation component of the CFrame but if you really need to get the values that you would use in the CFrame.Angles constructor there is an API for that.

local cf = CFrame.Angles(math.pi/2, 0, 0)
local x, y, z = cf:ToEulerAnglesYXZ()
local newCF = CFrame.Angles(x, y, z) 
-- newCF is aprox equal to cf, some loss of precision likely

This page on the devhub has a list of all the CFrame APIs:

54 Likes