Skip to content

getinstances

Includes all memory-tracked instances

getinstances should be able to return instances outside of game.

getinstances retrieves every Instance from the registry. Which means that instances that are/were parented to nil will also be returned.

function getinstances(): { Instance }

Parameters

Parameter Description
(none) This function takes no parameters.

Example

Finding a nil-parented instance
1
2
3
4
5
6
7
8
local dummy_part = Instance.new("Part")
dummy_part.Parent = nil

for _, instance in pairs(getinstances()) do
    if instance == dummy_part then
        print("Found the dummy part!")
    end
end