Efficient way of requiring modules in terms of performance

Not quite exactly. In my way, the module script parts would be under the main module script, so if you move around the main script, you only call require once, regardless the location of the main script.

Also, you set the module scripts to the _G.module, so there’s might a chance that hackers can change it since it is global for everyone if I am not mistaken.

Here’s the part where someone say that the hackers can access _G

5 Likes