of     1   

evolvedpikachu
#123736175Wednesday, January 22, 2014 1:39 AM GMT

^ and if you prefer one over another in a specific situation, please specify. I prefer ModuleScripts because I don't like having to type _.
MettaurSp
#123737420Wednesday, January 22, 2014 1:51 AM GMT

I prefer ModuleScripts because _G just seems messy to me.
ChatPersonThing
#123739805Wednesday, January 22, 2014 2:13 AM GMT

yes, also _G can't be used in local scripts
bohdan77
#123740194Wednesday, January 22, 2014 2:17 AM GMT

ChatPersonDudeSomethingIDK _G can be used with localscripts, just it's a different environment than Scripts.
cntkillme
#123740401Wednesday, January 22, 2014 2:19 AM GMT

I don't use either, I never really find myself needing to (unless library)
TheScriptAdventurer
#123744478Wednesday, January 22, 2014 3:03 AM GMT

I discovered ModuleScripts in December, and I fell in love with it. It is so much better than _G, since it doesn't pollute _G. Although there isn't much use for _G otherwise.....
TheLuaWeaver
#123745644Wednesday, January 22, 2014 3:16 AM GMT

I use both _G and ModuleScripts. I use the ModuleScripts to organize code + load it in a specific order. ~LuaWeaver; Programmer, gamer, developer.
bl0wmeup
#123746737Wednesday, January 22, 2014 3:29 AM GMT

I use both because when you can script as amazing as me it's just natural to do both
MettaurSp
#123748174Wednesday, January 22, 2014 3:44 AM GMT

Dat 'Live As A Happy Family In Robloxia And Get Rich' and Kohl's admin...
DejaVu_Loop
#123749004Wednesday, January 22, 2014 3:52 AM GMT

I like module b ecause you can easily track it down rather than having to find the source of where the global was created ehen I want to change it. Also modules can hold many functions.
TheScriptAdventurer
#123753680Wednesday, January 22, 2014 4:51 AM GMT

Actually, I have on my primary account already created a framework based on ModuleScripts. It also sandboxes them so an error in one can't propagate up the call stack and crash the main code :). I like it so far. I'm even considering doing remote loading of such modules off the Roblox website, so I can dynamically load any modules I don't have in the place. That WOULD save space, and make pushing updates easier.
Fluffmiceter
#123763577Wednesday, January 22, 2014 1:16 PM GMT

:/ Neither one is compatible with local.
Alyte
#123774995Wednesday, January 22, 2014 5:39 PM GMT

I Prefer ModuleScript's Cause they Make U Game Faster xD
Notunknown99
#123776150Wednesday, January 22, 2014 6:05 PM GMT

I use both, because I use _G wrong. Deal with it.
Notunknown99
#123776175Wednesday, January 22, 2014 6:06 PM GMT

*ModuleScripts wrong, not _G wrong.
Oysi
#123779413Wednesday, January 22, 2014 7:07 PM GMT

What are you guys on about? They are two completely different things. You don't use one or the other. Also, what are you talking about neither of them working on the client? That's completely incorrect.
Tenal
#123779466Wednesday, January 22, 2014 7:08 PM GMT

fedora boy above :^o
celestala
#123781393Wednesday, January 22, 2014 7:41 PM GMT

That's what I was thinking, Oysi. While they may be used for similar tasks, they're completely different. As for this crap about them not being able to work on the client, anyone who believes that either: A. Never used them before. or B. Is an idiot.
MettaurSp
#123793723Wednesday, January 22, 2014 10:27 PM GMT

If you are one who thinks they don't work on the client, use RemoteFunctions to replicate values to clients. _G and results for ModuleScripts do not replicate.
Sasayaki
#123834776Thursday, January 23, 2014 7:05 AM GMT

I might be completely missing something with this statement but _G only because of global variables whereas Modulescripts only contain functions. If modulescripts can take on variables, completely ignore my statement.
sncplay42
#123846371Thursday, January 23, 2014 4:17 PM GMT

"What are you guys on about? They are two completely different things. You don't use one or the other." I think it was pretty clear the question meant "do you implement libraries by storing them _G or using require/ModuleScripts?".
Evra
#123853987Thursday, January 23, 2014 7:08 PM GMT

There is 0 reason to use _G now that ModuleScripts exist. I would like to see an argument otherwise.
Alyte
#123862151Thursday, January 23, 2014 9:26 PM GMT

I Agree With the Above Post, storing Value's in _G is Lame....ModuleScrp are Can Be use As _G but Fast'er cuz they Load Once.
sellethore
#123863996Thursday, January 23, 2014 9:49 PM GMT

Not sure which I'd rather have, ModuleScripts are great for small functions that are used multiple times in normal scripts and local scripts. _G functions on the other hand are lovely for creating main functions and parsing states.

    of     1