Module scripts not getting called

local Modules = {script["Items Handler"], script["Passes Handler"], script["Points Handler"], script["Categories Handler"]}

for _, Module in ipairs(Modules) do
	require(Module)
end

image

Maybe changing ipairs to pairs will work?
Or it has something to do with the item not loaded in when calling the modules in the table. Maybe changing script["Items Handler"] to script:FindFirstChild("Items Handler")

Or if you want to make sure future modulescripts will be loaded in automaticly, you can also do the following

for i,v in pairs(script:GetChildren()) do
require(v)
end

Or change it to script:GetDescendants() for the level handler also be loaded in.

Always use ipairs with arrays unless you want arbitrary order, it also shows you’re working with arrays - a change of the iterator function won’t likely solve the problem.

What let you infer they aren’t getting called? I’m also assuming the LocalScript is under some container it’ll run in.

double check your modules and make sure that they all have a local module = {} and return module (module being called what ever you put for it of course)

1 Like

What does your ModuleScripts look like?

Why not do a GetChildren or GetDescendants below your script, these both return tables

1 Like

In addition to this, make sure to check that the ClassName is of type Module