Skip to main content

clientMouseUtil

A simple utility module for working with the client's mouse.

Functions

registerMouseHoverStart

clientMouseUtil.registerMouseHoverStart(
callback(
instanceInstance,
mousePositionVector2
) → (),
minActivationDistancenumber?,
maxActivationDistancenumber?
) → Connection

Registers the given callback which is called whenever the player hovers over a 3D instance.

registerMouseHoverEnd

clientMouseUtil.registerMouseHoverEnd(callback(
instanceInstance,
mousePositionVector2
) → ()) → Connection

Registers the given callback which is called whenever the player no hovers over a 3D instance.

Show raw api
{
    "functions": [
        {
            "name": "registerMouseHoverStart",
            "desc": " \n\nRegisters the given callback which is called whenever the player hovers over a 3D instance.",
            "params": [
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "(\n\t\tinstance: Instance,\n\t\tmousePosition: Vector2\n\t) -> ()"
                },
                {
                    "name": "minActivationDistance",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "maxActivationDistance",
                    "desc": "",
                    "lua_type": "number?\n"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Connection"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 32,
                "path": "src/clientMouseUtil/init.luau"
            }
        },
        {
            "name": "registerMouseHoverEnd",
            "desc": " \n\nRegisters the given callback which is called whenever the player no hovers over a 3D instance.",
            "params": [
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "(\n\tinstance: Instance,\n\tmousePosition: Vector2\n) -> ()"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Connection"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 66,
                "path": "src/clientMouseUtil/init.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "clientMouseUtil",
    "desc": " \n\nA simple utility module for working with the client's mouse.",
    "source": {
        "line": 6,
        "path": "src/clientMouseUtil/init.luau"
    }
}