ReferenceEnvironment

isuntouched

Reads the environment’s Luau safe-environment flag.

Syntax

isuntouched(env: table) -> boolean

Also available as

is_un_touched

Parameters

ParameterTypeDescription
envtableEnvironment table.

Returns

TypeDescription
booleanCurrent untouched flag.

Description

An untouched environment permits optimized builtin imports. Calling getfenv or setfenv can clear that flag because the globals can change. This flag is about compiler/VM assumptions, not whether a script has ever written any table key.

Example

print(isuntouched(getfenv()))

These are Game executor contracts. Check build requirements and session lifetimes before using them.