Trying to make a custom shift lock system, and I can’t get the RotationType to change between CameraRelative and MovementRelative. Here’s the script:
local uis = game:GetService(‘UserInputService’)
local rs = game:GetService(‘RunService’)local toggle = false
local togglekey = Enum.KeyCode.LeftControluis.InputBegan:Connect(function(key, typing)
if key.KeyCode == togglekey and typing == false then
toggle = not toggle
end
end)rs.RenderStepped:Connect(function()
if toggle == true then
UserSettings().GameSettings.RotationType = Enum.RotationType.CameraRelative
else
UserSettings().GameSettings.RotationType = Enum.RotationType.MovementRelative
end
end)
I’ve been looking in the forum for an answer for a while, but I haven’t found any helpful topics. I don’t even know if it’s possible to change. Any tips?
Also I don’t know why the code got pasted like that. It’s kinda harder to read like this but I dunno how to fix it.