Yuari
Documentation

load

Alias of loadstring.

Syntax

load(source: string, chunkName?: string) -> function

Parameters

ParameterTypeDescription
sourcestringLuau source code to compile or execute.
chunkName?stringThe chunk name value used by the call.

Returns

TypeDescription
functionThe returned function.

Description

load is part of the Scripts & decompiling library. Script helpers inspect scripts in the live DataModel and can read bytecode or decompile source.

Each call creates or returns a fresh object or value that you can store and pass to other functions.

Example

local fn = load("return 2 + 2", "chunk")
print(fn())

Notes

  • Script bytecode and source are read from the live game.