Free tool for Roblox creators

Luau playground: run Luau in your browser

A Luau playground runs Luau, the language Roblox games are scripted in, without opening Roblox Studio. Write code, press Run, see what it prints, and check its types with the same type checker Studio uses.

Luau playground

Official Luau engine
Output

Tab indents; press Escape, then Tab, to leave the editor. Runs stop after 5 seconds. Your code stays in this browser, and a shared link carries it in the part after # that is never sent to our server.

  • The official Luau engine
  • Strict type checking
  • No login; nothing leaves your browser

The short answer

This playground runs standard Luau: variables, tables, functions, strings, math, types and errors behave exactly as in a Roblox script. What it does not have is Roblox itself: game, workspace, Instance, task and the services exist only inside Roblox, so code that uses them needs Roblox Studio. Use the playground to learn the language, try an idea or test a function before you put it in a game.

Engine built from the official Luau source on 21 October 2026.

What runs here

Luau here and in Roblox Studio

The language is the same. The world around it is not.

FeatureThis playgroundRoblox Studio
Variables, tables, loops, functionsYesYes
string, table, math, buffer, bit32, utf8YesYes
Type annotations and --!strictYes, with Check typesYes, in Script Analysis
String interpolation, +=, continue, generalized forYesYes
pcall, error, coroutinesYesYes
game, workspace, Instance, Vector3, CFrameNoYes
task.wait, wait, eventsNoYes
Services such as Players or DataStoreServiceNoYes

Code that calls Roblox APIs fails here with attempt to index nil, because those globals do not exist outside Roblox. For that code, use Roblox Studio, which is free.

Learn Luau

Five things to try first

  1. Print and loop. The Hello and loops example shows print and a numeric for loop. Change the numbers and run it again.
  2. Tables. Tables are Luau's only data structure: lists, dictionaries and objects. Tables and sorting sorts players by score.
  3. Functions and closures. Functions and a cooldown builds the cooldown check almost every Roblox attack or pickup script needs.
  4. Types. Load Types (with a mistake) and press Check types. The checker finds the wrong price before the code ever runs.
  5. Errors. Errors and pcall reproduces attempt to index nil, the most common Roblox script error, and catches it with pcall. The script errors guide explains how to fix it in a game.

FAQ

Luau playground questions

What is Luau?

Luau is the programming language Roblox games are scripted in. It started as Lua 5.1 and Roblox has added types, string interpolation, compound assignment such as +=, faster performance and more. It is open source.

Is Luau the same as Lua?

Luau is based on Lua 5.1 and most Lua 5.1 code runs in it, but it adds features Lua does not have, such as type annotations and string interpolation, and removes a few unsafe ones. Code written for newer Lua versions may not run.

Can I run Roblox scripts here?

Only the plain Luau parts. game, workspace, Instance, task and the services exist only inside Roblox, so a script that uses them needs Roblox Studio, which is free.

Is my code saved or sent anywhere?

Your code stays in your browser: the page keeps a draft on your device, and a shared link carries the code after the # sign, which browsers never send to the server. Nothing you write is uploaded.

Why did my script stop after 5 seconds?

The playground stops any run that takes longer than 5 seconds, which is almost always an endless loop. Roblox stops a script that never yields too, with the error Script timeout: exhausted allowed execution time.

Does Check types match Roblox Studio?

It uses Luau's own type checker in strict mode, the same checker behind Studio's Script Analysis. Studio also knows Roblox's API, so it checks calls such as workspace:FindFirstChild that this page cannot.

From practice to a game

Turn your Luau into a working game

When your idea needs players, parts and the rest of Roblox, it belongs in Studio. RoCode, an independent AI agent for Roblox Studio, writes the scripts in the place you have open.

Free credits every day, no card. Prefer to learn by hand? Start with scripting for beginners.

Share

Link to this playground

Free to use in a DevForum post, a tutorial or your own site.

Sources and credits

RoCode is an independent product, not made by Roblox. The Luau engine on this page is unmodified; the page around it is RoCode's.