Hello scripting helpers community. Im creating a project and got stuck with a nil error when i was trying to get Vector3 type arrays from a table. Can somebody explain how do i add vector3 type values inside a table and also how do i access them? its because i want to get the vector3 types as "for i,v in pairs(arrayList) do...."
so this is part of the script:
local partARRAYS= {}
function paintpart()
for i,part in pairs(workspace:GetDescendants()) do
if part:IsA("Part") or part:IsA("UnionOperation") then
for i = 0 ,part.Size.X ,4 do
for j = 0,part.Size.Z,4 do
table.insert(partARRAYS,Vector3.new(i,part.Position.Z+(part.Size.Z/2)+2,j))
end
end
end
if part:IsA("TrussPart") then
for i = 0 ,part.Size.X ,4 do
for j = 0 ,part.Size.Y ,4 do
for k = 0 ,part.Size.Z ,4 do
table.insert(partARRAYS,Vector3.new(i,j,k))
end
end
end
end
end
end
paintpart()
local arrayList = partARRAYS:GetChildren()
and the error shows "attempt to call a nil value" when i try to access the arrays of the table called "partARRAYS" any help?

4 comments
So how do i access all the vector3 type indexes in a table?
loop over the table ??? or just table.unpack() which would return everything inside a table as a tuple, but do you understand what GetChildren() does ? it returns a table with the children of an instance, but partARRAYS is already a table so i dont understand what you want
I have a table full of vector3 type indexes i want to return it so i can use it as "for i,vector3insideTheTable in pair(table) do..." So i guess its loop over the table
you can mark this answer as solved now