Yuari
Documentation
Docs/Reflection/getreferencedby

getreferencedby

Returns instances that reference the target through a property.

Syntax

getreferencedby(instance: Instance) -> table

Parameters

ParameterTypeDescription
instanceInstanceTarget Instance to search references for.

Returns

TypeDescription
tableInstances that hold a reference to the target property.

Description

getreferences scans the live instance cache and checks same-typed reference properties on every instance to find values that point at the target.

The scan can be expensive because it walks all instances and their property descriptors. Results are returned as an array.

Example

for _, instance in ipairs(getreferences(workspace.Baseplate)) do
    print(instance:GetFullName())
end

Notes

  • Aliases: getreferences(instance).
  • Reflection reads live property metadata; hidden-property writes can desynchronise client state.
  • Only direct reference properties are checked.
  • The scan reflects the current game state.