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
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)