Skip to content
DiagnosticsOverviewNew · 0.744

getscriptthreadid

Identify a thread associated with script diagnostics.

Details#

Returns a session-local numeric thread identifier for a script, or 0 when no thread is found. It is neither an operating-system thread ID nor a persistent script identifier.

Examples#

Example

Luau
local ownScript = Instance.new("LocalScript")
print(getscriptthreadid(ownScript)) -- 0 without a running thread
ownScript:Destroy()