local NewTable = {}
for Index, Module in pairs (TowerModules) do
table.insert(NewTable, Module)
end
The code above is attempting to take the values from a dictionary, and insert them into an array. The dictionary is constructed like so:
local TowerModules = {
[1] = Instance1;
[2] = Instance2;
[3] = Instance3;
}
All of the keys are numbers. When the first code iterates through TowerModules dictionary, I am assuming the values of the dictionary are inserted to the new table, with the new table becoming an array since no keys are specified.
The issue is, when I pass the NewTable to the client via RemoteEvent, the result is nil. I have encountered this issue in the past, and it was due to mixed key types. Why would this be happening now? Can instances not be passed?