Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
Organizing code
Series description
As you continue to work with code, scripts will become more complex. To address this, coders have a variety of techniques to make coding efficient, easy to understand, and reduce the chance of error. This series covers methods of organizing scripts, such as module scripts, a special type in script that can store functions and variables used by other scripts.
Objectives and prerequisites
| Learning objectives | Understand the logic behind module scripts, as well as how to code a module script and access it in other scripts. |
| Prerequisites | Have an understanding of functions, events, and if/then statements. |
Series contents
| Article | Description |
|---|---|
| [Intro to module scripts](/docs/roblox-tutorials-fundamentals-coding-6-intro-to-module-scripts) | Learn how to use module scripts, a type of script that stores functions and variables that can be called or accessed from other scripts. |
| [Create with module scripts](/docs/roblox-tutorials-fundamentals-coding-6-create-with-module-scripts) | Apply using module scripts to create a mini-game where players gather keys to open chests. |
| [Coding abstraction](/docs/roblox-tutorials-fundamentals-coding-6-coding-concept-abstraction) | Abstractions in computer science provide a simplified representation of something larger. They pull out only the most necessary information and hide everything else. |
| [Coding algorithms](/docs/roblox-tutorials-fundamentals-coding-6-coding-concept-algorithms) | An **algorithm** uses a series of steps to determine an outcome. Steps can be a set of directions, comparisons, or even a mathematical formula. |