Library

instances

tablesince 1.7.6b-alpha

Address-keyed instance construction and cache management. Exposes the global invalidation signal so scripts can react to instance churn.

Properties

1
NameTypeAccessDescription
OnInstanceConfusedEventread

Fires with the Instance that was just invalidated by the cache. Deferred onto the Luau VM thread.

since 1.7.6b-alpha

Functions

2

#instances.from_address(address: number) → Instance?

since 1.7.6b-alpha

Creates an instance given its address in memory, automatically determines classname, and the backing type. Returns nil if the instance is not valid, or an Instance if it succeeeds. The function may fail if the given address is not a valid address or if the address is unreadable or not in the working set.

Parameters

addressnumber

The address of the instance

#instances.invalidate(instance: Instance) → nil

since 1.7.6b-alpha

Invalidates an instance, raising the internal Invalidation event, removing it from the Instance cache and removes it from the Luau VM

Parameters

instanceInstance

The instance to invalidate in the instance cache