MouseBehavior.LockCenter does not work

I would assume this would lock the mouse (similar to shift locking in game) but it doesn’t :confused:

UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter

Yup, that’s right. It works like shift locking. UserInputService only works in a local script, so are you using a local script?

Ye it’s local script, and definitely being fired, but does not lock mouse at all

I think I had a similar problem before, but that was a long time ago. Would you mind sharing us some lines of your code so we can figure this out together?

That’s all the code I have? It should work with just that according to the hub

Looks like a bug. See LockCenter/LockCurrentPosition MouseBehaviors not working on Orbital/Watch CameraTypes - #8 by EchoReaper . I had experience with this bug before in 2020 and decided to just use First Person Mode. It’s a bug that resets your MouseBehaviour to Default after changing it to something else. I guess the only way to solve this is by looping it. They say it’s been solved, but I don’t think it has (maybe its fixed in newer games, but thats for u to try)


while task.wait() do
	UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter

Try doing what @BasedKnowledge said, and print out UserInputService.MouseBehavior while you’re at it.

After I did this and removed while after playing it worked.

Just had this problem today, thanks a lot man!