Hello, how can I make shift lock be forced on, I have looked at some other topics, though the solutions are outdated and cannot be used. Does anyone know how I can make the shift lock stay on and not be turned off? Basically the opposite of “Set by Developer” where it says shift-lock cannot be applied. Thanks!
game:GetService("RunService"):BindToRenderStep("ForceShiftlock", Enum.RenderPriority.Camera.Value + 1, function()
UserSettings():GetService("UserGameSettings").RotationType = Enum.RotationType.CameraRelative
-- Get the camera
local currentCamera = workspace.CurrentCamera
if not currentCamera then return end
-- Update the camera
if (currentCamera.Focus.Position - currentCamera.CFrame.Position).Magnitude >= 0.99 then
currentCamera.CFrame = currentCamera.CFrame*CFrame.new(1.75, 0, 0)
currentCamera.Focus = CFrame.fromMatrix(currentCamera.Focus.Position, currentCamera.CFrame.RightVector, currentCamera.CFrame.UpVector)*CFrame.new(1.75, 0, 0)
end
end)
This is an edited version of what I use in my game to implement shiftlock for mobile and console devices, it should work for your use-case too.
Would this be a local script in starter player scripts or starter gui?
I would probably put it in StarterCharacterScripts but it doesn’t matter much, and yes it would be a local script
That wasn’t working. You said:
-so can it work for PC, also my camera gets auto set to fixed by a different script, it might be from that.
The math behind it should be functional if you hold down your right mouse button from what I just tested, you’ll just have to figure out how to lock your mouse to the center (this wasn’t a thing I had to account for with mobile and console controls)
Oh, I’m not a scripter at all so you would have to explain to me in “dumb language” lol.