I’m trying to copy over an Attachment but I don’t know where to put all the numbers in a CFrame.
I get something like this: 0.5, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1. I dont know what those numbers are for.
https://developer.roblox.com/en-us/api-reference/datatype/CFrame
Those go deeper into the meaning of CFrame, the math, and what those numbers are for/mean!
The understanding CFrames only tells how CFrames works and how to work with CFrame.
CFrame Math Operations assumes you understand how vectors work.
x, y, z
are fairly basic parameters for CFrame. They are Cartesian coordinates. However, the 9 other numbers that follow are part of the so-called rotation matrix, which is a bunch of trigonometric math if you look closer into it. That’s too complicated to manually write up.
Therefore, if you want to move an attachment with a position and rotation using CFrame, there is CFrame.new(x, y, z)
and CFrame.Angles(x, y, z)
. For the latter method, I do not remember if it was using degrees or radians.
@anon81993163 Everything uses radians, except for BasePart.Orientation and math.rad.
Also note that working with CFrame is kind of hard. You mostly need to combine them in order, meaning CF1 * CF2 is not always equal to CF2 * CF1