Syntax
getscriptfromthread(thread: thread): Instance | nilArguments
| Name | Type | Description |
|---|---|---|
thread | thread | Thread to inspect or run inside. |
Returns
| Name | Type | Description |
|---|---|---|
script | Instance | nil | Script instance associated with the context, or nil. |
Description
Returns the script associated with a thread.
Call it with 1 parameter(s): thread. The argument table explains which values are required and which ones only refine the behavior.
It returns script (Instance | nil). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = getscriptfromthread(coroutine.running())
print(result)