Threads
getscriptfromthread
Returns the Script Instance associated with a Luau thread, or nil when no valid script reference is available.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns the Script Instance associated with a Luau thread, or nil when no valid script reference is available.
getscriptfromthread(thread: thread): Instance | nil
local thread = coroutine.create(function()
end)
local scriptInstance = getscriptfromthread(thread)
print(scriptInstance)