Context:getpointer

Reads the pointer position in the game client.

Syntax

Signature
Context:getpointer() -> {X: number, Y: number}?

Aliases

This function has no aliases.

Parameters

This function takes no parameters.

Returns

TypeDescription
{X: number, Y: number}?Plain table containing X and Y, or nil. It is not a Vector2 userdata.

Notes

Returns nil when the platform cannot find a usable game window or read its pointer position.

Example

Luau
local Context = input.createcontext()
local Result = Context:getpointer()
print(Result)
Context:destroy()