getrunningscripts
Returns an array of all currently active Script and LocalScript instances.
function getrunningscripts(): {Script | LocalScript}Synopsis
How it works
Returns an array of all
LocalScript and ModuleScript instances that currently have an active Luau thread. Walks the VM's thread list and collects the Script instance associated with each running lua_State. Deferred/yieldedYieldPausing a Luau coroutine/thread, returning control to the scheduler. The thread resumes later when the yielding condition is met (e.g., task.wait timer expires, HTTP response arrives). Implemented via coroutine.yield(). scripts are included; finished scripts are not.Usage
Print running scripts
for _, script in ipairs(getrunningscripts()) do
print(script:GetFullName())
endReturns
{Script | LocalScript} Array of all running script instances.