I have tried this, but I seem to be having no luck.
local chil = game.ReplicatedStorage.Maps:GetChildren() for i,v in pairs(chil) do local num = 1 table.insert(_G.Dialog.Options,num,chil.Name) num = num + 1 end
Any help would be appreciated
It looks like you're trying to combine the two methods of iterating a table: the key-value pair method, and the list/index method. If you want to use pairs, that's fine, but you may as well make use of the variables that they call for:
local maps = {} -- New table local chil = game.ReplicatedStorage.Maps:GetChildren() for i,v in pairs(chil) do table.insert(maps,v.Name) end
The use of the global table is not recommended. If you need to share a table between scripts, consider using a module script instead and just return the table at the end of the script.