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

Can you store other scripts in a Private Module?

Asked by 6 years ago

I was looking at Scripth's admin and saw he uses a private module to store his code.

Does he put a script inside the module? How does the code execute? Is it possible to store other scripts in a Private Module?

0
Yeah pretty sure you can have other scripts inside a private module Optikk 499 — 6y
0
Yes its possible to store other scripts in a Private Module l3gendrasp -5 — 6y
0
And yeah 100% you can, you can also store like values or etc in a module script if you need to Animescapetower 10 — 6y

1 answer

Log in to vote
0
Answered by
Kev_nn 4
6 years ago

A privatemodule is basically code inside of a modulescript that can be required from anywhere in your game. If you call it MainModule and upload it to ROBLOX, you can require it from other games using the model ID.

With the module script, it is possible to put more scripts and other objects as the children of the module. When the model is required in another game, all of the children are imported as well.

The main purpose of using this method is to protect the scripts from being copied. The model does not have to be set to uncopylocked to be required in other games. However, it must be named "MainModule."

Ad

Answer this question