Skip to main content
Compiles a Luau source string and returns the loaded function. If loading fails, it returns nil and an error message. The returned function is not executed automatically.

Syntax

Arguments

Returns

Example

Compile source text and handle a possible compiler error.