Skip to content
Roblox API Reference

Mouse

Legacy object that contains members useful for pointer input.
  • Not creatable
Memory category
Instances
Own members
25
Inherited members
75
Subclasses
2
Siblings
608

Properties37

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byMouse14

Property categoryData

  • Mouse.Hit: CFrame
    The CFrame of the mouse's position in 3D space.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.Icon: string
    The content ID of the image used as the Mouse icon.
    • Read capabilities: Input
  • Mouse.IconContent: Content
    The content of the image used as the Mouse icon. Only supports asset URIs.
    • Read capabilities: Input
  • Mouse.Origin: CFrame
    A CFrame positioned at the Workspace.CurrentCamera and oriented toward the mouse's 3D position.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.Target: BasePart
    The object in 3D space the mouse is pointing to.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.TargetFilter: Instance
    Determines an object (and its descendants) to be ignored when determining Mouse.Hit and Mouse.Target.
    • Read capabilities: Input
  • Mouse.TargetSurface: Enum.NormalId
    Indicates the NormalId of the BasePart surface at which the mouse is pointing.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.UnitRay: Ray
    A Ray directed towards the mouse's world position, originating from the Workspace.CurrentCamera world position.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.ViewSizeX: number
    Describes the width of the game window in pixels.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.ViewSizeY: number
    Describes the height of the game window in pixels.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.X: number
    Describes the X (horizontal) component of the mouse's position on the screen.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.Y: number
    Describes the Y (vertical) component of the mouse's screen position.
    • Read only
    • Read capabilities: Input
    • Save only
  • Mouse.hit: CFrame
    Deprecated: This property is a deprecated variant of Mouse.Hit which should be used instead.
    • Deprecated
    • Hidden
    • Read only
    • Read capabilities: Input

    Use Hit instead.

  • Mouse.target: BasePart
    Deprecated: This property is a deprecated variant of Mouse.Target which should be used instead.
    • Deprecated
    • Read only
    • Read capabilities: Input

    Use Target instead.

Methods42

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

Events21

Inherited fromObject1
Inherited fromInstance9
Defined byMouse11
  • Mouse.Button1Down: RBXScriptSignal<()>
    Fires when the left mouse button is pressed.
    • Capabilities: Input
  • Mouse.Button1Up: RBXScriptSignal<()>
    Fires when the left mouse button is released.
    • Capabilities: Input
  • Mouse.Button2Down: RBXScriptSignal<()>
    Fires when the right mouse button is pressed.
    • Capabilities: Input
  • Mouse.Button2Up: RBXScriptSignal<()>
    Fired when the right mouse button is released.
    • Capabilities: Input
  • Mouse.Idle: RBXScriptSignal<()>
    Fired during every heartbeat that the mouse isn't being passed to another mouse event.
    • Capabilities: Input
  • Mouse.Move: RBXScriptSignal<()>
    Fired when the mouse is moved.
    • Capabilities: Input
  • Mouse.WheelBackward: RBXScriptSignal<()>
    Fires when the mouse wheel is scrolled backwards.
    • Capabilities: Input
  • Mouse.WheelForward: RBXScriptSignal<()>
    Fires when the mouse wheel is scrolled forwards.
    • Capabilities: Input
  • Mouse.KeyDown: RBXScriptSignal<(key: string)>
    Deprecated: Mouse events have been superseded by UserInputService which should be used in all new work.
    Fires when a Key is pressed.
    • Deprecated
    • Capabilities: Input
    Parameters
    Parameter
    key: string

    Use InputBegan instead.

  • Mouse.KeyUp: RBXScriptSignal<(key: string)>
    Deprecated: Mouse events have been superseded by UserInputService which should be used in all new work.
    Fires when a Key is released.
    • Deprecated
    • Capabilities: Input
    Parameters
    Parameter
    key: string

    Use InputEnded instead.

  • Mouse.keyDown: RBXScriptSignal<(key: string)>
    Deprecated: This event is a deprecated variant of Mouse.KeyDown which has also been deprecated. Neither event should be used in new work.
    • Deprecated
    • Capabilities: Input
    Parameters
    Parameter
    key: string

    Use InputBegan instead.