Do ModuleScripts copy a table or point to it?
Asked by
5 years ago Edited 5 years ago
Recently, I have been making a ModuleScript that handles the behavior of multiple buttons. However, I started to wonder more about how ModuleScripts work. Do ModuleScripts return a copy of the table in a ModuleScript or point to the table in the module?
For example:
04 | local val = math.random( 2 , 10 ) |
06 | module.PathToPart = workspace.Part |
08 | module.ClearUnnamedParts = function () |
09 | local desc = workspace:GetDescendants() |
10 | for _, descendant in desc do |
11 | if descendant.Name = = "Part" then |