My 3D Cellular Automata isn't calculating all of the cells

You can write your topic however you want, but you need to answer these questions:

While i was testing my 3d cellular automata i saw one thing.
That structures were symmetrical outside, but not inside.
And that gave me worries cause i’m unsure is my script working correctly

There is part of the script responsible for reading all of the cells

``````	local length = #tbl / (#tbl / BlocksPerWait)
local rest = #tbl % (#tbl / BlocksPerWait)
for n2 = 1,#tbl,length do
wait()
for n = n2,n2+length do
local cell = tbl[n]
if cell then
local i = table.find(tbl,cell)
local div = string.split(cell.Name,".")
local x,y,z = tonumber(div[1]),tonumber(div[2]),tonumber(div[3])
local CellName = cell.Name
local CC,ListOfCells = GetNeigbours(x,y,z,CellName)
for i,cellName in pairs(ListOfCells) do
local div = string.split(cellName,".")
local x,y,z = tonumber(div[1]),tonumber(div[2]),tonumber(div[3])
local CC = GetNeigbours(x,y,z,CellName)
RuleCalc(CC,cellName)

end
RuleCalc(CC,CellName)
end
end
end
for n = #tbl-rest+1,#tbl do
wait()
local cell = tbl[n]
local length = #tbl / (#tbl / 1000)
if cell then
local i = table.find(tbl,cell)
local CellName = cell.Name
local div = string.split(CellName,".")
local x,y,z = tonumber(div[1]),tonumber(div[2]),tonumber(div[3])
local CC,ListOfCells = GetNeigbours(x,y,z,CellName)
for i,cellName in pairs(ListOfCells) do
local div = string.split(cellName,".")
local x,y,z = tonumber(div[1]),tonumber(div[2]),tonumber(div[3])
local CC = GetNeigbours(x,y,z,CellName)
RuleCalc(CC,cellName)
end
RuleCalc(CC,CellName)
end
end
``````

If there are no error the It’s most likely not and error but instead the rule of your game.If there’re any error,Please add it

No errors.
I would say it if there was a error