Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to force the MouseLock option onto a player?

Asked by 7 years ago

I want to make a 3rd-person game of sorts and I want the player to behave exactly as if they have the Mouse Lock option selected. Is there a way to make this automatically happen without having the player manually go into their setting and turn it on?

0
I forgot where it was located, but every time the user enables and disables shift lock a remoteevent is fired. Find that remoteevent and ou can toggle shift lock. NewVoids 97 — 7y
0
You could set the player's CameraMode to 'LockFirstPerson,' as that'll *force first person & the player's mouse will stay in the center of the screen. :) However, this property is w/in the player's properties, and if you use FE, I'm not sure how that'll turn out. o-o TheeDeathCaster 2368 — 7y

1 answer

Log in to vote
0
Answered by
P100D 590 Moderation Voter
7 years ago
game:GetService("UserInputService").MouseBehavior = "LockCenter"

Make sure this is set from a LocalScript

Ad

Answer this question