APEX docs
Reference

Instances

Find, fire and inspect game objects.

cache.invalidate

Also available as cache.iscached cache.replace cache_invalidate is_cached cache_replace

Works with that table of object references. invalidate drops an entry, iscached checks for one, and replace swaps one object's entry for another.

cloneref

Also available as clonereference clone_ref

Returns a second reference to the same object. It compares unequal to the original with ==; use compareinstances to compare them.

function cloneref<T>(object: T & Instance): T

compareinstances

Also available as compare_instances

Returns true if two references point at the same object, including references made by cloneref.

function compareinstances(object1: Instance, object2: Instance): boolean

fireclickdetector

Also available as fire_click_detector

Triggers a ClickDetector as though a player clicked it, optionally from a given distance.

function fireclickdetector(detector: ClickDetector, distance: number?, event: string?): ()

fireproximityprompt

Also available as fire_proximity_prompt

Triggers a ProximityPrompt as though the player held the key, without needing to be near it.

function fireproximityprompt(prompt: ProximityPrompt): ()

firetouchinterest

Also available as firetouchtransmitter fire_touch_interest

Makes two parts touch, or stop touching, as if one walked into the other. The third argument is 0 or true to start touching and 1 or false to end.

function firetouchinterest(part1: BasePart, part2: BasePart, toggle: boolean | number): ()

getcallbackfunction

Also available as getcallbackmember getcallbackvalue get_callback_function get_callback_member get_callback_value

Returns the function set as a callback property, such as OnClientInvoke. Written in other spellings as getcallbackvalue or getcallbackmember.

function getcallbackvalue(object: Instance, property: string): any | nil

gethui

Also available as get_hidden_gui get_hui

Returns a container for your own interfaces.

function gethui(): BasePlayerGui | Folder

getinstancecache

Returns the table of object references that were handed out earlier.

getinstances

Also available as get_instances

Returns every object in the game, including ones not in the normal hierarchy.

function getinstances(): { Instance }

getnilinstances

Also available as get_nil_instances

Returns objects that exist but have no parent.

function getnilinstances(): { Instance }

getproximitypromptduration

Also available as setproximitypromptduration

Reads, or with the set form changes, how long a ProximityPrompt must be held.