Hello!
I have this somewhat specific scenario, I have a module which, on require, should create a table of all the buttons, however I was wondering if the table that is returned is an actual reference by the table that is inside of the module that can be modified by that same function?
For example, this is my module:
local module = {
['Table'] = (function()
local table = {}
workspace.DescendantAdded:Connect(function(descendant)
table[#table + 1] = descendant
end)
return table
end)()
}
return module
Now, after the first require, it looks like this:
local module = {
['Table'] = {}
}
return module
Now, if I fire the event in the first code sample, would it modify the table inside of the second code sample?