Confused about table.pack with CFrame:GetComponents()

Hello!

Basically, I am not sure why but CFrame:GetComponents() returns an index called “n” whose value is 12 for some reason?

print(table.pack(workspace.CurrentCamera.CFrame:GetComponents()))

returns

{
["n"] = 12, -- ?
[1] = -13.44534492492676,
[2] = -31.63729858398438,
[3] = -90.24311828613281,
[4] = -0.5648349523544312,
[5] = -0.4919747412204742,
[6] = -0.6625122427940369,
[7] = 2.980232238769531e-08,
[8] = 0.8028467893600464,
[9] = -0.5961856245994568,
[10] = 0.8252039551734924,
[11] = -0.3367465138435364,
[12] = -0.4534758925437927
}

What is “n”?

1 Like

n is the number of elements in the packed table. A CFrame is a matrix of twelve values, so it would contain twelve elements.

1 Like