Yuari
Documentation
Docs/Instances/getthreads

getthreads

Returns threads associated with a script or state.

Syntax

getthreads(script?: Instance) -> table

Parameters

ParameterTypeDescription
script?InstanceThe script value used by the call.

Returns

TypeDescription
tableThreads associated with a script or state

Description

getthreads is part of the Instances library. Instance helpers traverse the live DataModel and return instance proxies tied to the current game session.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

Example

for _, thread in ipairs(getthreads()) do
    print(thread)
end

Notes

  • Returned instances are live proxies; they can become invalid if the object is destroyed.