getactorfromthread Synchronous
getactorfromstate
Resolve the Actor associated with a thread proxy or LuaStateProxy. Use it when state enumeration gave you a proxy and you need the owning Instance.
Luau
getactorfromthread(target: thread | LuaStateProxy) -> Actor?Parameters
| Parameter | Type | Description |
|---|---|---|
target | thread | LuaStateProxy | Thread proxy or LuaStateProxy to resolve. |
Argument fields
Luau
LuaStateProxy = {Id: number, IsActorState: boolean, Event: NativeSignal}Returns
Actor?An Actor Instance when one can be identified; otherwise nil.
Example
Luau
local thread = getactorthreads()[1]
if thread then
local actor = getactorfromthread(thread)
print(actor and actor:GetFullName())
end