Luau Guide
Overview
Note
Type Annotations
Variables
local Gold: number = 1Functions
local function Sum(a: number, b: number): number
return a + b
end
print(Sum(1, 2))
function AddScalarToVector3(v: Vector3, scalar: number): Vector3
return Vector3.new(v.X + scalar, v.Y + scalar, v.Z + scalar)
end
local Pos = Vector3.new(50, 0, 10)
print(AddScalarToVector3(Pos, 100))Variadic Functions
Tables
Instance
Type Checking
Autocomplete Integration

Inference Modes
Inference Modes
Features
--!nocheck

--!nonstrict

--!strict

Flexible Type System
Optional Type
Type Cast
Literal Type Specification
Unions and intersections
Syntax & Expressions
Compound Assignment
Operator
Features
if Expressions
continue Keyword
String interpolation
Loop Statement
Generic For Loops
Generalized Iteration
User-Defined Types
Type
Type Exports
Generic
Generics
Function Generics
Libraries
Table Cloning Function
String Splitting Function
Exit Coroutine
Task
Conveniently Managing Coroutine Using TaskLast updated