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

LockCenter not working?

I'm trying to make it so the mouse gets locked to the center of the screen. No matter what I do it doesn't seem to work. I even tried the tutorial on the wiki and it did not work. No errors either for both methods. Any help is appreciated. Below is what I tried using, its being ran on the client(localscript). Thanks for reading. :)

local UserInputService = game:GetService("UserInputService")
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter

1 answer

✓ Accepted answer

It seems that it must be getting overwritten by ROBLOX Core Scripts. I suggest putting it in a while loop, so it's constantly set to LockCenter.

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