CreateClosureFromSource()
Function info¶
function LuauInLuau.CreateClosureFromSource(src: string, safeenv: boolean?, optimizationlevel: number?, debuglevel: number?): () -> ()
Compiles Luau source into a closure
Arguments¶
src: string
- The sourcesafeenv: boolean?
- Indicates whether safeenv features should be enabled or notoptimizationlevel: number?
- The optimization level for the resulting bytecodedebuglevel: number?
- The debug level for the resulting bytecode
Important note regarding the optimization and debug level arguments
The optimizationlevel
and debuglevel
argument is only available starting with LuauInLuau v0.579