Hello there, I don't seem to understand the concept of Modules, so I was wondering if anyone could help me or send me a link to a place that can help me, I couldn't understand it in the Roblox website sadly.
✓ ANSWER ACCEPTED
Help With Modules?
2 answers
✓ Accepted answer
They return stuff.
--I'm horrid at explaining stuff
--in a moduleScript--
function thing(otherThing)
--put stuff here
end
return thing
--in a script--
thing = require(theModuleScriptObject) --will return the function thing
thing(10)
--this also helps with sending over many functons
local tab = {}
function tab.f1()
--stuff
end
function tab.f2()
--stuff
end
function tab.f3()
--stuff
end
return tab
--in a script--
module = require(theModuleScriptObject)
f1 = module.f1
f2 = module.f2
f3 = module.f3
That's pretty much it. Leave a comment if this didn't answer your question.
Here is link to roblox's Tutorial http://wiki.roblox.com/index.php?title=API:Class/ModuleScript
2 comments
0
I said Roblox's tutorial didnt help, but thanks anyways <3
0
Oh okay ;) Sorry I didnt read
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Wow, thanks alot!