simple code, have a blank table with part CFrames in numberical order. Yet when I print the values, it seems table[1] is part 3, table[2] is 1, table[3] is 4, and table[4] is 2. Is this a bug or am I just doing something wrong...
table.insert(pointsTable,1,pointsModel[1].CFrame)
table.insert(pointsTable,2,pointsModel[2].CFrame)
table.insert(pointsTable,3,pointsModel[3].CFrame)
table.insert(pointsTable,4,pointsModel[4].CFrame)
EDIT: Tested this by changing it to
for i = 1, 4 do
pointsTable[i] = "pointsModel"..i
end
It seems to work fine with strings, but not with CFrame
SECOND EDIT:
I had a line before that sets pointsModel =workspace.Points:GetChildren(), forgetting that makes a table in a random order.

2 comments
Didn't work. I tried both methods and it still has the same order as 3,1,4,2
nvm, I figured it out. Thanks for the simplified code though, lol.