Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What does CFrame.Angles mean and what is it used for?

I'm unsure on what

CFrame.Angles

means.

1 answer

CFrame is very basically a database containing both position and orientation (and other stuff). CFrame.Angles is exactly what it sounds like, it changes angles for the orientation. However, (similar to how Color3.new doesn't accept RGB values), It only accepts radiants and not degrees. So you can use math.rad() to change degrees into radiants. (I'm just gonna imagine that there is a part in workspace, and you wanna change the orientation.)

workspace.Part.CFrame = CFrame.Angles(math.rad(90),math.rad(0),math.rad(0)) --XYZ Value

However, when you use CFrame.Angles, it resets the position to 0,0,0. So if you wanna keep the position, then you need times it.

workspace.Part.CFrame = workspace.Part.CFrame * CFrame.Angles(math.rad(90),math.rad(0),math.rad(0)

This discussion is preserved as it was. New answers, comments, and votes are closed.