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

How would I lock the mouse?

How would I lock the mouse in third person, as if the player was constantly holding the right mouse button. I understand scripting helpers isn't a request site, however, I am not asking for 2,000 lines. I just need to be educated.

I'll provide some context though; https://gyazo.com/d43f0625926f223ac39beb28e1472121 It's for my GTA style aiming system.

1 answer

✓ Accepted answer

So make this in a local script:

--Define the player and other things, if you need.
local UserInputService= game:GetService("UserInputService") --Gets the service, of course
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter --Changes 'MouseBehavior'.

I am not too good at explaining, sorry. Hope this helps!

2 comments

0

You're a lifesaver bud!

0

;)

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