--Main Script --\\ Nicknames local Frame = script.Parent.PositioningFrame local Tabs = require(script.Get) --\\ Main Code for _,v in pairs(Tabs.Get) do print('Tab name is:' ..v) end
--Module local Get = {} local Find = script.Parent.Parent.PositioningFrame:GetChildren() for i = 1, #Find do if Find[i].ClassName == 'TextButton' then local add = table.insert(Get, Find[i].Name) end end return Get
I'm not 100% used to how Modules work, so bare with me if I ask silly questions when you answer.
Most of what you wrote is valid except for one line, so I'm not gonna lecture you on modules. But I will say that when you require a module, the value it returns is passed directly to where it was required - much like returning a value through a function, and therein lies the source of your problem .
Line 6: You try to index Tabs
for table Get
, when Tabs represents Get. Instead of saying Tags.Get
, just pass Tabs as an argument to pairs in your for loop and you should be clear on that issue.
-- Example for i,v in pairs(Tabs) do -- etc end