1 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Arrays and dictionaries

Series description

Data structures are how coders store and organize entire sets of data. In Luau, data structures are tables. Unlike variables, tables can hold any number of values. Tables can store a list of high scores, a player's inventory, or all of an object's properties. Two types of tables covered in this series are dictionaries and arrays.

Objectives and prerequisites

Learning Objectives Learn common structures for storing sets of information, such as arrays and dictionaries, and use cases for each structure.
Be able to manipulate data structures, such as adding, removing, or returning values from a structure like an array.
</td>
Prerequisites Have a general understanding of variables in Luau.
Feel comfortable using conditional statements (`if` and `else`) and loops (`for` and `while`).
</td>

Series contents

Article Description
[Intro to arrays](/docs/roblox-tutorials-fundamentals-coding-5-intro-to-arrays) Learn how to store like groupings of data together with arrays.
[Loops and arrays](/docs/roblox-tutorials-fundamentals-coding-5-loops-and-arrays) Combine arrays with loops to repeat code with a disappearing path trap.
[Make changes to arrays](/docs/roblox-tutorials-fundamentals-coding-5-make-changes-to-arrays) Add and remove values in arrays by coding a script to manage a player's inventory
[Intro to dictionaries](/docs/roblox-tutorials-fundamentals-coding-5-intro-to-dictionaries) Organize complex sets of data with pairs using dictionaries.