Hi! I'm using game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
to lock the mouse to the center of the screen. This works perfectly in Play Solo, however when I run it in game, it doesn't work.
I believe you need to set the camera property to LockFirstPerson
. Unless you're trying to make it so that the player's mouse is locked but the camera is still outside the player?
After reading the wiki here, it says the function must be called from a LocalScript. The script probably worked in Solo mode because I'm told that scripts all run locally in Solo mode. Try putting your code in a LocalScript, and if that still doesn't work, I'll look into it further.