Input
The input functions allow you to dispatch inputs on behalf of the user.
isrbxactive
Returns whether the game's window is in focus. Must be true for other input functions to work.
Aliases
isgameactive
Example
mouse1click
Dispatches a left mouse button click.
mouse1press
Dispatches a left mouse button press.
mouse1release
Dispatches a left mouse button release.
mouse2click
Dispatches a right mouse button click.
mouse2press
Dispatches a right mouse button press.
mouse2release
Dispatches a right mouse button release.
mousemoveabs
Moves the mouse cursor to the specified absolute position.
Parameters
x
- The x-coordinate of the mouse cursor.y
- The y-coordinate of the mouse cursor.
Example
Move the cursor in a circle around the screen:
mousemoverel
Adjusts the mouse cursor by the specified relative amount.
Parameters
x
- The x-offset of the mouse cursor.y
- The y-offset of the mouse cursor.
Example
Moves the cursor in a small circle:
mousescroll
Dispatches a mouse scroll by the specified number of pixels.
Parameters
pixels
- The number of pixels to scroll.
Last updated