Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Locking mouse into the center of the screen?

How can i make the mouse pointer stay locked at the center of the screen, like the shift lock mechanic. I tried looking at the script for it but i don't see how it works

1 answer

✓ Accepted answer
-- Lock the mouse in the center of the screen
game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
-- Or you can lock the mouse where it is
game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
-- Reset the mouse back to it's normal state
game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default

2 comments

0

Dude thank you! But where did you get this information?? I tried looking for this everywhere in the wiki!

0

This discussion is preserved as it was. New answers, comments, and votes are closed.