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

Is a Global Function the Same as a Module Function?

Asked by 6 years ago

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?

2
No visible difference, however Roblox discourages the use of _G and shared. You should be using module functions instead of global functions. Griffi0n 315 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

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.

Ad

Answer this question