I have no clue why it would be required recursively…
Module script (The part where I require the modules):
self.ModuleGroup = nil
if game.Players.LocalPlayer ~= nil then
self.ModuleGroup = self.ReplicatedStorage.Modules
self.Player = game.Players.LocalPlayer
else
self.ModuleGroup = self.ServerScriptService.ServerMain
end
self.Modules = {}
for _, Module in pairs(self.ModuleGroup:GetDescendants()) do
if Module.ClassName == "ModuleScript" then
self.Modules[Module.Name] = require(Module)
end
end
for _, Module in pairs(self.ReplicatedStorage.Modules.Universal:GetDescendants()) do
if Module.ClassName == "ModuleScript" and Module.Name ~= script.Name then
print(Module)
self.Modules[Module.Name] = require(Module)
end
end
In my Server scripts, Local script, and my module scripts I have this:
local EncyclopediaModule = require(game:GetService("ReplicatedStorage").Modules.Universal.Encyclopedia)
local Encyclopedia = EncyclopediaModule.Initialize()