Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I use the require function? [closed]

Asked by
Andorks 23
8 years ago

For example:

require(modelid)

I do not understand it. Please help!

Marked as Duplicate by BlueTaslem

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 8 years ago

How to load a Module using require(<int>)()

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)()
Ad