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

Is it possible to force a player into mouselock?

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

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

2 comments

0

Don't forget the DevCamera Setting thing, at StarterPlayer!

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.

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