getinstances

getinstances should be able to return instances outside of game.

Returns a list of all instances referenced by the client.

function getinstances(): { Instance }

Example

local DummyPart = Instance.new("Part")

for IndexInstance, ValueInstance in pairs(getinstances()) do
    if ValueInstance == DummyPart then
        print(`Found the wanted nil instance: {DummyPart}`)
    end
end

Last updated