Currently I’m in the process of encoding and decoding cframes, and do so I need to construct it/deconstruct it so it is viable with json encode. However, I figured out how to obtain the x,y,z cframes, but not the m11 which is neccesssry for getting the rotational values so then when I construct it/deconstruct it, the values remain the same. Any ideas on how I obtain the rotational cframe values?
By m11 and m12 I presume you’re talking about R11 and R12
You can use CFrame:GetComponents() to get every component of a CFrame.
local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = SomeCFrame:GetComponents()
Ah ok, so I could do Part.CFrame.R00 Correct?
No, R00 is not a property of CFrame types. If you want the R00 component, it is easiest to use GetComponents which returns a tuple containing that component.
Don’t forget you can use a table to prevent creating lots of variables if you’re only interested in one part of it.
local components = table.pack( yourCframe:GetComponents() )
local R00 = components [ 4 ]
But you’ll need to know where the thing you’re after is positioned in the list of components, e.g. R00 and position 4.
I figured that out shortly after the post was made. After 2 days of struggle, I finally did this which was pretty nice. Thanks for the help though, I’ll be marking you as a solution so people know what worked.