ClickDetector
Inherits: Instance
ClickDetector allows player mouse interactions with a parent PhysicsInstance.
Properties
How far away the player can be from the ClickDetector to click it.
Signals
Event fired when the ClickDetector is left-clicked, with the Player who clicked. Fires on the server (authoritative) and on the clicking client.
Event fired when the mouse begins hovering the ClickDetector (client-side, local player).
Event fired when the mouse stops hovering the ClickDetector (client-side, local player).
Event fired when the ClickDetector is right-clicked, with the Player who clicked. Fires on the server (authoritative) and on the clicking client.
Properties
Whether this Instance or any of its descendants should be included when saving or copying via Clone()
The unique identifier for this Instance.
If true, this instance and all of its descendants cannot be selected in the editor.
The name of this Instance.
The parent of this Instance in the hierarchy.
The sort index of this Instance among its siblings. If this Instance has no parent, this value is ignored.
Functions
Attaches a script to this instance by its file path. The path should be relative to the root assets directory, e.g. "Scripts/MyScript".
Creates a deep clone of this Instance and all its descendants.
Removes this Instance, and all its descendants, from the DataModel, and locks its parent property.
Schedules this Instance to be destroyed after the specified delay in seconds. This function will error if called multiple times.
Removes a script from this instance by its file path. The path should be relative to the root assets directory, e.g. "Scripts/MyScript".
Returns an array of the children of this Instance.
Gets the global bounding box that encapsulates all DynamicInstance children of this Instance.
Returns the path of the script component at , or an empty string if the script file no longer exists.
Determines if this Instance is a descendant of the specified ancestor Instance.