getreg
Returns the Luau registry, the internal table holding every thread and reference the VM keeps alive.
Signature
getreg(): { [any]: any }Returns
table
Example
local registry = getreg()
local threads = 0
for _, value in registry do
if type(value) == "thread" then
threads += 1
end
end
print(threads, "threads in the registry")