Making a boundary for the mouse position on screen

The title pretty much explains itself but what I wanting to know is if there is a way to constrain the mouse object to move in a certain boundary ex. only inside a frame or is the only option to have a fake mouse UI that is constrained?

The reason why I need to know this is so I can prevent the mouse from being able to hover over and click these UI’s in-game

Make a UI mouse.

https://developer.roblox.com/en-us/api-reference/class/UserInputService

These articles can help you get the position of the mouse and when it moves.

1 Like

yeah i assumed this was the only approach in the end

thanks for sending articles though!

You can actually disable the real mouse icon with UserInputService | Roblox Creator Documentation

1 Like