Weird Shift Lock Glitch

I have this weird bug that loads the shift lock mouse UI but it doesn’t even work,

shift lock only properly works when I hold right click.

any help would be heavily appreciated thank you! :folded_hands:

1 Like

Likely cause: a LocalScript is fighting the default PlayerModule by forcing MouseBehavior or camera each frame. Result: the shift-lock icon shows, but the cursor only locks while RMB is held.

1 Like
  1. Use default camera/movement.
local p = game:GetService("Players").LocalPlayer
p.DevEnableMouseLock = true
p.DevComputerCameraMode = Enum.DevComputerCameraMovementMode.Classic
p.CameraMode = Enum.CameraMode.Classic
  • Do not set workspace.CurrentCamera.CameraType every frame. Never keep it Scriptable during gameplay.
  • Remove or rewrite any code that touches UserInputService.MouseBehavior. If you must support RMB drag, do it without toggling MouseBehavior:
local CAS = game:GetService("ContextActionService")
CAS:BindAction("RMBDrag", function(_, state)
	-- Do nothing. Let the default camera module handle RMB rotate.
	return Enum.ContextActionResult.Pass
end, false, Enum.UserInputType.MouseButton2)
  1. Ensure you did not replace PlayerScripts.PlayerModule. If you did, delete your custom copy and let Roblox ship the default.
  2. Quick isolation: disable all LocalScripts under StarterPlayerScripts except a blank one. Verify shift-lock works. Re-enable scripts one by one to find the offender. The bad script will:
  • set UserInputService.MouseBehavior = Enum.MouseBehavior.Default on MouseButton2 release, or
  • set CameraType/CameraSubject repeatedly.

If after this the issue persists, paste the smallest LocalScript that edits MouseBehavior or CameraType; I’ll pinpoint the exact line to remove.

2 Likes

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