Scripts

getreferencedby

Returns objects or scripts that reference the provided instance.

Syntax

getreferencedby(instance: userdata): table
Aliases getreferences

Arguments

NameTypeDescription
instanceuserdataRoblox instance to inspect or update.

Returns

NameTypeDescription
instancestableArray table of matching instances.

Description

Returns objects or scripts that reference the provided 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

Example call with placeholder values.

local result = getreferencedby(game)
print(result)