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.

Syntax
Luau
getactorfromthread(target: thread | LuaStateProxy) -> Actor?

Parameters

Function parameters
ParameterTypeDescription
targetthread | LuaStateProxyThread proxy or LuaStateProxy to resolve.

Argument fields

LuaStateProxy fields
Luau
LuaStateProxy = {Id: number, IsActorState: boolean, Event: NativeSignal}

Returns

Actor?

An Actor Instance when one can be identified; otherwise nil.

Example

Example
Luau
local thread = getactorthreads()[1]
if thread then
    local actor = getactorfromthread(thread)
    print(actor and actor:GetFullName())
end
Kawaii documentation