So modules are very interesting
I will give you a random module script example
local module = {
value1 = "Hello"
value2 = "World"
}
module:testFunction()
print("Hello World Function!")
end
return module
In the server script, you could do something like this (assume the module script is a child of the script)
local moduleScript = require(script.ModuleScript)
print(moduleScript.value1) -- Prints "Hello"
for i,v in pairs(moduleScript) do
print(v) -- Prints "Hello" then "World"
end
moduleScript:testFunction() -- Prints "Hello World Function!"