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

Global functions or Modules?

Hey there, so I have been wondering for a while now as to what I should use Global Functions or Module Scripts. I want to know as to which one is more efficient and by 'efficient' I mean one that causes less lag and more smoothness in the game.

Thank you for putting your time into reading this question and if you have any questions as to what I mean please post them in the comments below.

~~ KingLoneCat

1 answer

✓ Accepted answer

Neither will cause any lag. Lag is caused by all of your resources being used up. Work uses resources. There's no work involved in something so minute.


You should avoid global functions and variables in as much as it is possible, they are difficult to make work the way you want.

Use ModuleScripts.

You can also use BindableFunctions as a more controllable alternative to global functions (though you can only pass JSONable data+instances through them)

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