How to use "modules" and loaders overall?

I saw a lot of Admin Modules having some loaders.

Basically, I am trying to test that on GUI (If this is even possible) (and maybe later some commands which my friend, which is better in scripting than me made). Since we have more group games, this would be really helpful to auto update

For now, I will test that only on a ScreenGui. How would I start that? If you know some sources that someone already made you can send me these, but when I type “Modules” I mostly just find ModuleScript topics.

Basically, I uploaded this GUI and its type is Model.

1 Like

Loaders make use of a special grant for ModuleScripts where uploading them to the website allows you to require them by their AssetId. Loaders are used to insert the source code from the asset so that whenever it’s updated, the latest version will always get used.

Writing a website ModuleScript is the same as writing a standard ModuleScript, however it must be uploaded with the name “MainModule” in order to be valid. Any ModuleScript children can also be included. Once you upload it to the site, you can get its id and put it in the require function for it to be loaded.

Learning how to use modules and loaders is a broad topic with many different answers. There is no one way to use them, as they have infinite use cases across systems. It’s more about learning how they’re applicable in your scenario than how to use them at all.

In terms of auto updating or reusable code, if you only need that auto updating code to work in your games and you need it across several group games and their places, I’d recommend packages instead. You can package any asset and reuse it as necessary. This includes scripts.

4 Likes

Okay, thank you for your help!