Custom Shift-lock problem

I’m making a custom Shift-lock script, but the problem is, I have to hold Right Mouse Button to move the camera around, like how it is by default. How do I make it, so you don’t have to hold Right Mouse Button, to move the camera while the Shift-lock script is running (like the actual Shift-lock, where you can move the camera freely)? I’ll implement it myself in my code. At least show me how I can do it myself.

Thanks.

You could try locking the mouse like how the default one works which should switch the camera rotation mode:

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