Start from nothing
Never programmed before? Ten minutes gets you a door that opens, closes itself and remembers whether it was open after a restart.
What scripts are
Make things happen in your world. No experience needed.
Objects in your world can carry scripts — instructions that make them react. A door that opens when clicked, a lamp that comes on at dusk, a shop with a working menu, a weapon with recoil and ammunition.
--!strict
local self = require("self")
self:on_touch(function(player)
self:tween({
rot = { x = 0, y = 90, z = 0 },
seconds = 0.6,
ease = "in_out",
})
end)That is a door. Read it as a sentence: when someone touches me, turn a quarter turn over six tenths of a second.
| You want to | Go to |
|---|---|
| understand what this is | What scripts are |
| build something now | Your first script |
| learn the language | Luau essentials |
| copy a working thing | Recipes |
| look up a verb | API reference |
| work out why nothing happens | Reading errors |
Scripts live inside objects. There is no central file for a world. Copy the object and the behaviour comes with it — sell a lamp, drop it in another world, and it still works.
Scripts wait. A script is not a recipe that runs and finishes; it is a set of answers to things that might happen. It costs nothing while it waits.
Almost everything runs on the server. Every player sees the same result and nobody can edit their own copy to cheat. The handful of things that would feel broken with a delay — menus, the crosshair, a weapon's kick — run on the player's own machine, and you never have to choose.
Refusals explain themselves. A verb that cannot do what you asked hands back nil and a reason in plain words. Nothing crashes, and the reason is almost always the answer.