Requiring multiple module scripts


I was wondering, is there a better way to require multiple modules?

It causes a lot of clutter…

local PressModule = require(ReplicatedStorage.Modules.ClientModules.Init:WaitForChild("Press"))

local BobbleModule = require(ReplicatedStorage.Modules.ClientModules.CameraEffects:WaitForChild("BobbleEffect"))
local BobbleEffect = BobbleModule.Init(Character)

local HintModule = require(ReplicatedStorage.Modules.ClientModules.UI:WaitForChild("Hint"))
local Hint = HintModule.Init(Player)


You can combine the modules into 1. For example, instead of having a module for fruits and a module for vegetables, have a single module with a table called fruits and a table called vegetables.

1 Like