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

Is it possible to force a player into mouselock?

Asked by 9 years ago

I know that from Studio it's possible to make it so that players can't toggle ShiftLockSwitch/Mouselock, but that seems to leave me stuck with a free camera. Is there an easy way to force a shiftlock view (where the mouse automatically rotates the character and camera), or does it require a more convoluted approach?

1 answer

Log in to vote
0
Answered by 9 years ago

Yes. A Player object has a bool value called DevEnableMouseLock. This is if you want a player to be able to use it, true means they can use it, false means they can't.

There are also multiple values in StarterPlayer:

http://wiki.roblox.com/index.php?title=API:Enum - use this to change the values http://wiki.roblox.com/index.php?title=API:Class/StarterPlayer

0
Don't forget the DevCamera Setting thing, at StarterPlayer! NathanAdhitya 124 — 9y
0
Except that doesn't force them into mouse-lock mode. It can force them OUT of mouse-lock, but not into it. I'm getting the feeling that I'll need something a little deeper than a built-in system. Sunshine60 5 — 9y
Ad

Answer this question