Syntax
getactorfromthread(thread: thread): Instance | nilAliases
getactorfromstateArguments
| Name | Type | Description |
|---|---|---|
thread | thread | Thread to inspect or run inside. |
Returns
| Name | Type | Description |
|---|---|---|
actor | Instance | nil | Actor instance, or nil when none is associated. |
Description
Returns the Actor 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 actor (Instance | nil). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = getactorfromthread(coroutine.running())
print(result)