How can I make Shiftlock switch available again?

Recently, ROBLOX has deprecated the option to turn it on and off in studio, so how I would change it now?

Good question.

EnableMouseLockOption and DevEnableMouseLock have indeed been marked as deprecated and removed from studio properties.

Script access still exists for backwards compatibility (though it’s not recommended for new work).

game:GetService("StarterPlayer").EnableMouseLockOption = false

Alternatives? None are a match so far. It’s very fresh news and we have yet to see what Roblox will do about it.

I suggest the following as a fine reading material.

  • A comprehensive overview by StrongBigeMan9.

(plus other posts)

  • A recent engine feature request.

Under a second thread I’ve also seens a hacky workaround for disabling shift-lock. It works, though I’m not exactly thrilled about it because it simply unbinds the action and ignores the On/Off setting in the menu instead of locking with Set by developer label.

A shortened version of the original.
local CAS = game:GetService("ContextActionService")
local GuiService = game:GetService('GuiService')

local function UnbindLock()
	CAS:UnbindAction("MouseLockSwitchAction")
end

repeat task.wait()
	UnbindLock()
until not CAS:GetAllBoundActionInfo()["MouseLockSwitchAction"]

GuiService.MenuClosed:Connect(UnbindLock)
2 Likes

@davidsusbus please excuse this slight bump of the thread.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.