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

How can I use the require function?

For example:

require(modelid)

I do not understand it. Please help!

1 answer

✓ Accepted answer

How to load a Module using require()()

1st, : Your ModuleScript MUST be named `MainModule'
2nd, : After you upload the ModuleScript under ServerScriptService go to the link 3rd, : Get the numbers (as you should know) 4th, : Put the the numbers into a Script in game.Workspace

#LinkHelp : http://www.roblox.com/----item?id=267224959 <- Link (obv) 1st, : the numbers will be the 267224959

-- ModuleScript coding
return function ()
	print("Hello world")
end

Script in workspace

-- Script coding
local ModuleNum = 267224959 --From the link
require(ModuleNum)()

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