Skip to content
Roblox API Reference

Selection

The Selection service controls the Instances that are selected in Roblox Studio.
  • Not creatable
  • Service
Memory category
Instances
Own members
15
Inherited members
75
Subclasses
0
Siblings
608

Properties29

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined bySelection6

Property categoryAppearance

  • Selection.SelectionBoxThickness: number
    • Hidden
    • Read only
    • Roblox script security
    • Read capabilities: Basic
    • Save only
  • Selection.SelectionLineThickness: number
    • Hidden
    • Read only
    • Roblox script security
    • Read capabilities: Basic
    • Save only
  • Selection.SelectionThickness: number
    The thickness of the selection highlight outline drawn around selected Instances in Roblox Studio's viewport.
    • Read only
    • Capabilities: Basic

Property categoryData

  • Selection.ActiveInstance: Instance
    • Hidden
    • Read only
    • Roblox script security
    • Read capabilities: Basic
  • Selection.RenderMode: Enum.SelectionRenderMode
    • Hidden
    • Read only
    • Roblox script security
    • Read capabilities: Basic
  • Selection.ShowActiveInstanceHighlight: boolean
    • Hidden
    • Not replicated
    • Roblox script security
    • Read capabilities: Basic

Methods49

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined bySelection7
  • Selection:Add(instancesToAdd: { Instance })
    Adds the given Instances to the current selection in Roblox Studio.
    • Plugin security
    • Capabilities: Basic
    Parameters
    ParameterDescription
    instancesToAdd: { Instance }
    An array of Instances to add to the current selection.
  • Selection:AddFocusCallback(priority: number,function: (...any) -> ...any,): RBXScriptConnection
    • Roblox script security
    • Capabilities: Basic
    Parameters
    Parameter
    priority: number
    function: (...any) -> ...any
  • Selection:ClearTerrainSelectionHack()
    • Roblox script security
    • Capabilities: Basic
  • Selection:Get(): { Instance }
    Returns an array of currently selected Instances in Roblox Studio.
    • Plugin security
    • Capabilities: Basic
    Returns
    TypeDescription
    { Instance }
    An array of currently selected Instances.
  • Selection:Remove(instancesToRemove: { Instance })
    Removes the given Instances from the current selection in Roblox Studio.
    • Plugin security
    • Capabilities: Basic
    Parameters
    ParameterDescription
    instancesToRemove: { Instance }
    An array of Instances to remove from the current selection.
  • Selection:Set(selection: { Instance })
    Sets the currently selected objects in Roblox Studio to Instances in the given array.
    • Plugin security
    • Capabilities: Basic
    Parameters
    ParameterDescription
    selection: { Instance }
    An array of Instances to set the current selection to.
  • Selection:SetTerrainSelectionHack(center: Vector3, size: Vector3)
    • Roblox script security
    • Capabilities: Basic
    Parameters
    Parameter
    center: Vector3
    size: Vector3

Events12

Inherited fromObject1
Inherited fromInstance9
Defined bySelection2
  • Selection.SelectionChanged: RBXScriptSignal<()>
    Fires when the Instances selected in Roblox Studio changes.
    • Capabilities: Basic
  • Selection.SelectionChangedThisFrame: RBXScriptSignal<()>
    • Roblox script security
    • Capabilities: Basic