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

I thought CFrame was a xyz when I try to print a CFrame of a part it returns more than 3 xyz?

I thought like Vector3 CFrame was X Y Z just with rotation but then today

I tried the script


print(game.Workspace.Part.CFrame)


this printed not 3 but more than 3

I got 10.5, 0.5, -53.5, 1, 0, 0, 0, 1, 0, 0, 0, 1

2 comments

0

The wiki says "The first three of the 12 numbers are the x, y, and z components of the CFrame, in other words the position. The rest of the numbers make up the rotation aspect of the CFrame." @ https://developer.roblox.com/en-us/articles/CFrame-Math-Operations

0

dont print CFrame, instead print(game.Workspace.Part.Position)

1 answer

A CFrame includes the orientation and position of a part. I only use CFrames for setting the rotation and position at the same time. If you would like just the position, use part.Position (for just the X cord use part.Position.X) and for just the rotation, use part.Orientation. Hope this helps.

The first 3 are position The next 3 are orientation The last 3 That I never use mean something else, but I cannot remember, sorry.

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