Skip to content
Debug libraryOverviewNew · 0.744

debug.getsafeenv

Reports environment optimization metadata.

Aliasesdebug.isuntouched

Details#

Reads Luau's safe-environment optimization flag for a table, function environment or thread environment. With no target, reads the current global environment. This is an optimization marker, not a security verdict. These flags do not certify a security sandbox.

Examples#

Example

Luau
local environment = {}
print(debug.getsafeenv(environment))