LuaStateProxy: GetActors Synchronous
List the Actors associated with this proxy’s state. It helps you tell which Actor instances share the state before choosing a target.
Luau
LuaStateProxy:GetActors() -> {Actor}Parameters
Call this method with a LuaStateProxy receiver. The colon supplies self implicitly; a dot call must pass the receiver explicitly.
This function takes no arguments.
Returns
{Actor}An array of Actor Instances; the game state normally has none.
Usage notes
Call this with a colon on a live proxy. A proxy whose target state has ended raises an error.
Example
Luau
local state = LuaStateProxy.new()
for _, actor in ipairs(state:GetActors()) do
print(actor:GetFullName())
end