Instance

Documentation of instance-related Synapse Z environment functions

cloneref

Instance cloneref(instance: Instance)

returns a cloned reference of the specified instance

compareinstances

bool compareinstances(instance1: Instance, instance2: Instance)

compares 2 instances useful for comparing normal instance references with cloned references

gethiddenproperty

any gethiddenproperty(instance: Instance, property_name: string)

gets the property of the specified instance, including types such as: BinaryString and SharedString

sethiddenproperty

void sethiddenproperty(instance: Instance, property_name: string, value: any)

sets the property of the specified instance, including types such as: BinaryString and SharedString

isscriptable

bool isscriptable(instance: Instance, property_name: string)

returns whenever the specified property is scriptable or not

isscriptable

void setscriptable(instance: Instance, property_name: string, scriptable: bool?)

sets whenever the specified property is scriptable or not

getproperties

table<string> getproperties(instance: Instance)

returns a list of instance property names

gethiddenproperties

table<string> gethiddenproperties(instance: Instance)

returns a list of instance hidden property names

getinstances

table<Instance> getinstances()

returns a list of all instances

getnilinstances

table<Instance> getnilinstances()

returns a list of all instances which are parented to nil

getscripts

table<Script> getscripts()

returns a list of all scripts (ignores core modules/scripts)

gethui

Instance gethui()

returns a hidden UI instance container

fireclickdetector

void fireclickdetector(click_detector: ClickDetector, distance: number?)

fires the specified click detector with optional distance

fireproximityprompt

void fireproximityprompt(proximity_prompt: ProximityPrompt)

fires the specified proximity prompt

firetouchinterest

void firetouchinterest(target: Part, toucher: Part, touching: bool)

begins/stops touching the specified target by the specified toucher depending on the touching parameter

isnetworkowner

bool isnetworkowner(part: Part)

returns whenever we own network ownership of the specified part