How does the CFrame like r00 r10 and r20 work?

I’ve been messing around in studio making custom gears, and wanted to adjust the eating animation roblox plays, but to rotate it I have to use those and like.
What do they mean
how do I get from that to like 90 degrees or something
I am so confused DX


I’ve been trying to read the help article but it’s not making sense.

Generally, you’ll stick to CFrame.Angles and such as mentioned here, which abstracts away most of the matrix stuff. CFrames are matrices, but you generally don’t need to deal with the components directly.
See also: Incredibly helpful explainers for matrices and vectors

Then how would I change it into CFrame.Angles?

I tried doing this, but it’s not working.

(I am just learning how to code and i have like barley any clue of what I’m doing.)

1 Like

I asked my sister who used to code with roblox to help using this video and she came up with this.
image
But it’s stuck to only going forward from the hand with any value in position

CFrame alters Position and Orientation.

If you want to use rotation, you’ll have to multiply the previous CFrame.new() constructor by a CFrame.Angles() constructor.

When you’re inputting numbers into CFrame.Angles(), you need to convert them into radians using math.rad.

local result = CFrame.new(0, 1, 0) * CFrame.Angles(0, math.rad(45), 0) -- 1 stud up the Y axis, then rotates on the y axis by 45 degrees.

Thank you!
I’ll try this when I get back home.

one more thing; the constructor CFrame.new(vector, vector) can be safely replaced with CFrame.lookAt(vector, vector, vector?), it’s a bit faster and the optional third argument allows you to specify an up direction (defaulting to Vector3.yAxis)
in addition CFrame.lookAlong was added somewhat recently and is equivalent to CFrame.lookAt(pos, pos + for)