Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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

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 Ankur_007 290 — 4y
0
dont print CFrame, instead print(game.Workspace.Part.Position) Gameplayer365247v2 1055 — 4y

1 answer

Log in to vote
0
Answered by
P3tray 0
4 years ago

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.

Ad

Answer this question