menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
Is a ModuleScript a public variable?
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
Is a ModuleScript a public variable?
AviatorAdam
Join Date: 2016-04-19
Post Count: 44
#227626226
Friday, November 17, 2017 3:55 AM GMT
I am wondering if a module script puts a variable in all the scripts in the game
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Y0_dude
Join Date: 2016-08-03
Post Count: 113
#227626403
Friday, November 17, 2017 4:00 AM GMT
A the values of a module script will only be in the scripts that called require() on the module script.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chimmihc
Join Date: 2014-09-01
Post Count: 17143
#227627642
Friday, November 17, 2017 4:53 AM GMT
A module is a script that returns something, basically just cached functions accessed through the datamodel. There is nothing special about them.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
HILLBILLYY
Join Date: 2010-05-08
Post Count: 772
#227630249
Friday, November 17, 2017 8:04 AM GMT
spells = require(workspace.ModuleScript) spells.Spell1() will load the spell1 function inside of the module script
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right