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

How do you make private module scripts and work them?

Asked by
StoIid 364 Moderation Voter
8 years ago
Edited 8 years ago

I heard that you could make a module script and keep it somewhere else on a different source or something, and then a script in another place can use it. How?

Also, do they run the same?

1 answer

Log in to vote
0
Answered by
CodeNil 30
8 years ago

Upload the modulescript as a robloxmodel by itself, and name it "MainModule", then get the assetid of that model and in any script/localscript/modulescript at any place you can do

local Module = require(assetid) 

Then do whatever you want with it, the variable "Module" or whatever you want to name it will be the function/table that was returned in your modulescript.

Ad

Answer this question