Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Anyone have a good explanation of what a Module Script is?

For some reason the Wiki wont load for me, but a simple explanation of what it does and what I can do for it will be very helpful.

1 answer

I don't use Module scripts very often, but I do have a basic idea of what it does. Module scripts don't execute immediately whenever the game starts, and will run only once by calling require().

Example:

local mod = require(game.Workspace.Modulescript)
printmod("Test Print")

If you use it locally, it will run only once for a player. Same as with server-side scripts.

Whenever the Wiki starts working for you, here's the direct link to help you further.

If you have any further questions, you can send a message through my ROBLOX inbox.

~Kyo-Chan

This discussion is preserved as it was. New answers, comments, and votes are closed.