Yuari
Documentation

getmouse

Returns the local player Mouse userdata.

Syntax

getmouse() -> Mouse

Parameters

This function takes no parameters.

Returns

TypeDescription
MouseMouse userdata for the local player.

Description

This is the same userdata returned by LocalPlayer:GetMouse(). The VM currently exposes X and Y in client-space coordinates.

Example

local mouse = getmouse()
print(mouse.X, mouse.Y)

Notes

  • Hit, Target and UnitRay are not exposed yet.
  • The function returns a Mouse object even when the game is not attached; X and Y still follow the cursor.