Syntax
getreferencedby(instance: userdata): tableAliases
getreferencesArguments
| Name | Type | Description |
|---|---|---|
instance | userdata | Target Instance to search references for. |
Returns
| Name | Type | Description |
|---|---|---|
instances | table | New array table of matching registered Instance object values. |
Description
Returns cached Instance values whose supported reference properties point to the provided Instance. The argument must be an Instance.
Call it with 1 parameter(s): instance. The argument table explains which values are required and which ones only refine the behavior.
It returns instances (table). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Find values that reference a specific Instance.
local references = getreferencedby(workspace)
for _, value in ipairs(references) do
print(value)
end