Luau reference
Short reminders for the concepts you use while building. Official references provide the full language and engine API details.
The language you’re learning
Luau is the scripting language used in Roblox. It grew from Lua 5.1 and adds its own features, including gradual types. These activities teach Luau consistently.
Official Luau introduction ↗Values, names, and conditions
local level = 5 -- assignment
local allowed = level >= 5 -- comparison
local message = "Level " .. level -- concatenation
local hasPass = false
if allowed or hasPass then
print(message)
endNames are case-sensitive. Assignment uses =; equality comparison uses ==. Arithmetic combines numbers; .. joins strings. nil means no value, while false is a boolean. Only nil and false are false in conditions: zero is truthy.
Luau syntax ↗Functions and tables
local function label(name)
return "Hello, " .. name
end
local items = { "Lamp", "Gate" }
print(items[1]) -- sequence indices start at 1
local copy = table.clone(items) -- shallow copyA local name is visible in its enclosing scope after its declaration; it does not become a shared global. Two equal-looking tables are different identities. Assigning one table to another name shares that identity. table.clone copies one level; nested mutable values still need explicit copying.
Luau standard library ↗Types help describe intent
local function greeting(name: string): string
return "Welcome, " .. name
end
local function safeName(value: unknown): string
if type(value) == "string" then
return value
end
return "Visitor"
endType annotations and refinements help tooling reason about code. This browser executes Luau syntax; it does not provide Roblox Studio’s script analysis or engine autocomplete.
Luau type system ↗Browser runtime and Studio
Runs here means a genuine, pinned Luau runtime in a disposable browser worker. Learning simulation previews use evaluated values, with no Roblox physics, services, Instances, or replication. Requires Roblox Studio means you create and test the described hierarchy in your own isolated practice place.
Server assessment compiles source in a separate restricted runner. When it is unavailable, the site preserves your draft and shows the limitation; a browser result cannot grant trusted completion.
Move into Studio →Authoritative multiplayer state
A LocalScript cannot be trusted to decide rewards. The server validates input, permissions, distance, timing, and duplicate claims using its own state. UI feedback belongs on the client; authority belongs on the server.
Securing the client-server boundary ↗Learning and privacy
Lesson attempts and private code stay private. Learning XP is separate from community XP. A learning milestone describes an activity, not official Roblox accreditation or proof of professional quality. You can export or delete private code from My Journey.
Return to My Journey →