AcediaDocumentation

gettenv

Returns a thread's global environment.

The returned environment belongs to that thread and can differ from getgenv(). A thread that has already finished has no frames left to read, as with task.spawn(function() end), which returns a dead thread. For a thread like that, gettenv returns the caller's environment, which is the one the spawned function was created with.

gettenv(target: thread): table

Parameters

ParameterTypeDescription
targetthreadThread to inspect.

On this page