Let’s suppose this is being done ‘locally’, meaning, if the module is being required from multiple scripts and we were to somehow print which script is calling a module, it would print each, how would that be achieved? And, not exactly just print, but, exactly, know the script calling a module. Sorry for me explaining this very badly, here is a example:
local MyModule = {}
function GetRequiring()
return MyModule.Requiring -- Let's suppose Modules had a .Requiring property, which would return the script requiring the model.
end
return MyModule
From other scripts:
-- Script1
local MyModule = require(.ModuleScript)
print(MyModule().Disabled) -->>> false (.Script1.Disabled)
--//|\\--
-- Script2
local MyModule = require(.ModuleScript)
print(MyModule:GetRequiring().Name) -->>> Script2 (.Script2.Name)