Hello. I've seen many games locking the player's mouse, but I don't know how. Like they enable shift lock to the player without him pressing left shift. I would absolutely accept the helpful answer!
COMMUNITY QUESTION
How do I lock the player's mouse?
1 answer
https://developer.roblox.com/en-us/api-reference/property/UserInputService/MouseBehavior
local UserInputService = game:GetService("UserInputService")
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition -- or LockCenter or Default
Default: The mouse moves freely around the user’s screen.
LockCenter: The mouse is locked, and cannot move from, the center of the user’s screen.
LockCurrentPosition: The mouse is locked, and cannot move from, it’s current position on the user’s screen at the time of locking.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Hello. I appreciate your help, but I meant to shift-lock, how to enable shift lock without the player pressing Left Shift. Thanks anyways!