Skip to content
Saiko

setthreadidentity

Sets the current thread's security identity. Level 2 behaves like a normal game script, level 8 grants the most access.

Signature

luau
setthreadidentity(identity: number): ()

Parameters

identitynumber

The identity to assume, typically 2, 3, 6, 7 or 8.

Returns

Nothing.

Example

luau
local before = getthreadidentity()
setthreadidentity(2) -- behave like a normal game script
print(getthreadidentity()) --> 2
setthreadidentity(before)