Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is a Global Function the Same as a Module Function?

So I was reading through the wiki, and came across this:

http://wiki.roblox.com/index.php?title=Global_function

And I was interested, as it says that it can be called from any script. Is this not the same as a Module Script's function? Or are there differences?

1 comment

2

No visible difference, however Roblox discourages the use of _G and shared. You should be using module functions instead of global functions.

1 answer

Global Functions are variables that can be used through any script, roblox fully discourages it, since it makes it easiers to exploiters to use your code. Module Functions are different, since they can be only used if you require them, so you could place it at ServerScriptService and you wouldn't have to worry with exploiters.

This discussion is preserved as it was. New answers, comments, and votes are closed.