Hello, I’m attempting to make a script that will require all modules in the child of the script. But when the code hits the requiring area, It grounds to a total halt and does not require any service.
local Services = {}
for _, v in pairs(script:GetChildren()) do
if v:IsA("ModuleScript") then
Services[v.Name] = require(v)
end
end
I’ve tried printing the Services table, after i wrapped the code in spawn(function() but comes out empty.
local Services = {}
for _, child in script:GetDescendants() do
if not child:IsA("ModuleScript") then
continue
end
Services[child.Name] = require(child)
end
Seemingly made no change. I’m clueless at whats happening at this point, As I said earlier I use the same code in other areas of the game, and it works there, but oddly enough not here