roblox-luau-core
Luau Core Language
When to Load
Load when the task involves: Luau syntax/variables/operators, table operations, string patterns, math helpers, scope/closures, common idioms, porting from JS/Python, or sharp edges (1-based indexing, nil semantics, truthiness).
Hand off to: roblox-luau-types (type annotations/generics), roblox-luau-patterns (OOP/async/modules), roblox-* domain skills (engine APIs).
Full reference: references/full.md
Quick Reference
Basics: Luau = Lua 5.1 + extensions. Always local. No hoisting — callees above callers. Forward-declare for mutual recursion.
Extensions over Lua 5.1: continue, += -= *=, // floor division, math.clamp/sign/round, backtick interpolation, generalized iteration, table.freeze/clone/clear.
Truthiness: Only nil and false are falsy. 0, "", {} are truthy. No type coercion in == (0 == "0" → false).
Arrays: 1-based. #tbl length — unreliable with nil gaps, keep contiguous. Use table.insert/remove/find/sort/concat. Iterate: for k, v in tbl do.