#Module Loaders

1 messages · Page 1 of 1 (latest)

void silo
#

This is from a youtube video im understanding that it loads all the modules onto getservices custom module script but I don't get why this is useful even.
https://www.youtube.com/watch?v=sr4lh7PLFHI
heres the video

In this video I show you how to setup module loaders in #robloxstudio . This is something that every #roblox scripter should know. I hope you learned something new with this.

As always: Keep leveling up bro, be safe, and I'll see you when I see you, peace...

Place with the scripts: https://www.mediafire.com/file/lul0p1trznbtg6z/ModuleLoaders.r...

▶ Play video
#

also he mentioned only needing one serverside script and one client script to manage everything?

#

would be insane but sounds impossible

gaunt ore
#

one server script to load all the server modules and one client script to load all client modules

distant fern
void silo
#

so I use getservices custom module to load all the modules? then I put a local script inside starter player or smth? and one serverscript inside serverscriptservice?

queen aurora
# void silo so I use getservices custom module to load all the modules? then I put a local s...

The idea is you have a lot of module scripts that each have their own responsibility.

Server ones might be in ServerScriptService, client ones possibly in StarterPlayerScripts

You have one server script that calls require on every module script, and one client script that does the same for the client module scripts

Personally, I call server modules "Services", like "DataService", and client modules "Controllers", like "DataController", though naming is obviously up to you

void silo
#

ohhh I see

#

and the loader can js automatically require it everytime a new module

void silo
queen aurora
queen aurora
void silo
queen aurora