API reference
API reference
The Roblox scripting API: 59 namespaces and 385 entries, one page per group. Each entry gives its signature, what it does, its arguments and what it returns, with a short example where one helps.
Note
Entries marked Works differently behave unlike Roblox's own Luau. Entries marked Not available exist so that scripts written for Roblox still load, but they cannot work from outside the game. The note under each one says why.
Pages
| Page | What it covers | Namespaces |
|---|---|---|
| Globals and libraries | The functions every script has, the console, waiting and threads, and the Lua base library. | Globals, Console, Scheduler & modules, task, Lua base library |
| Input | Keyboard and mouse state, and input sent to Roblox. | Input |
| Files and HTTP | The workspace folder and web requests. | File system, HTTP |
| Memory and the Lua heap | Reading and writing the client's memory and its Luau tables. | Memory, Garbage collector |
| Instances and parts | Every Roblox object, parts, models and value objects. | Instance, PVInstance, Model, BasePart, MeshPart, ValueBase |
| The game and its services | game, Workspace, players, characters, the camera and the services scripts use. | DataModel (game), Workspace, Players, Player, Mouse, Humanoid, Camera, Lighting, UserInputService, RunService, HttpService, RemoteEvent, RemoteFunction |
| GUI objects | On-screen GUI elements of the game. | GuiObject, TextLabel, TextButton, TextBox |
| Signals | Events and their connections. | RBXScriptSignal, RBXScriptConnection |
| Raycasting | Rays, their options and their results. | RaycastParams, RaycastResult, Ray |
| Data types | Vectors, CFrames, colours, GUI sizes and enums. | Vector3, Vector2, CFrame, Color3, UDim, UDim2, Enum |
| Drawing | 2D drawings over the Roblox window, and every drawing kind. | Drawing, Square (Drawing), Line (Drawing), Circle (Drawing), Text (Drawing), Triangle (Drawing), Quad (Drawing), Image (Drawing) |
| Menu tabs (UI) | Tabs of your own, sections in the built-in tabs, sub-tabs, widgets and HUD panels. | UI, Tab (UI), Subtab (UI), Section (UI), Widget (UI), Keybind (UI), Combo (UI), Panel (UI) |
Permissions
Some entries need a switch in Scripts > Settings. Their entry says which. Permissions explains them.
| Switch | Starts | What it allows |
|---|---|---|
| Allow unsafe Luau | off | getbase, memory_read and memory_write (the Roblox client's memory) and getgc, setgc and applygc (its Luau tables). It is off by default and saved. |