Module Script Help

Where can I start on module scripts? Or where can I learn about the code because I am wondering if I can make many functions in a module, but I don’t know how to require a specific function

Lots of useful information about ModuleScripts can be found on the Roblox Developer Hub & Roblox’s Education Website.

Resources

ModuleScripts Article

Intro To ModuleScripts

Creating with ModuleScripts

Alright, I’ll read the articles.

I’ll give you a scenario to visualize:
Suppose you have 3 scripts in your game, for WalkSpeed exploit detections, fly exploit detection and Super Jump exploit detection. You want to kick/ban the Player. Now, you could Copy and Paste the code in each script to Kick/Ban the player. But a way more efficient method would be:

local BanModule = require(script.BanModule) -- Getting the Module Script's functions and variables

BanModule.Ban(Name, Reason)
1 Like

Ah alright. I got told that it will be easier to use ModuleScripts instead of having 500 regular scripts

1 Like

Yep, that’s a good scenario too

1 Like