Skip to content
EnvironmentOverview

setthreadidentity

Represents control of thread identity metadata.

Aliasessetidentitysetthreadcontext

Details#

Sets the numeric local identity for the current thread. The setting belongs to that execution context; server-side authorization is separate. Preserve and restore the prior value for temporary changes.

Examples#

Example

Luau
local identity = getthreadidentity()
setthreadidentity(identity)
print(getthreadidentity())