GetMouseLocation

Constructor:

GetMouseLocation()

Description

Returns the current position of the player's mouse in the screen.

Return Value

Variable name Type Default Description
vector2 Mouse position in the screen

Examples

Observe whether the event of the current mouse position in the screen is triggered or not

coroutine.start(function()
    while true do
        coroutine.wait(0.1) 
        print(tostring(UserInputService.GetMouseLocation()))
    end
end)