Problem is that while in first person your character will always look forward, so you will have to force the player out of first person to be able to rotate them to look at the camera. You can do it by simply setting CameraMinZoomDistance to a number higher than 0.5 when you are changing the camera mode.
The problem with shift lock is that option to disable shift lock with scripts has been deprecated, and I currently dont know a workaround for that. If I find a way to do it I will post it here.
For now it seems that there is no way of disabling it during gameplay unfortunately. Best way I believe is to just make a custom shift lock, I found this post:
Ive modified it a bit and made it into a module so its easier to use:
Module Script in Replicated Storage:
local CustomShiftLock = {}
local player = game:GetService("Players").LocalPlayer
local camera = game:GetService("Workspace").CurrentCamera
local runService = game:GetService("RunService")
local uis = game:GetService("UserInputService")
local character = player.Character or player.CharacterAdded:Wait()
local rootPart = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
local shiftlock = false
local disabled = false
local function shiftLock(toggle)
shiftlock = toggle
local function lock()
local lookVector = camera.CFrame.LookVector
local rootPos = rootPart.Position
local distance = 900
rootPart.CFrame = CFrame.new(rootPos, lookVector * Vector3.new(1, 0, 1) * distance)
end
if toggle then
runService:BindToRenderStep("ShiftLock", 200, lock)
humanoid.CameraOffset = Vector3.new(1.8,0,0)
else
runService:UnbindFromRenderStep("ShiftLock")
humanoid.CameraOffset = Vector3.new(0,0,0)
end
humanoid.AutoRotate = not toggle
uis.MouseBehavior = toggle and 1 or 0
end
player.CharacterAdded:Connect(function(char)
rootPart = char:WaitForChild("HumanoidRootPart")
humanoid = char:WaitForChild("Humanoid")
if not disabled and shiftlock then
shiftLock(true)
end
end)
function CustomShiftLock.enable(toggle)
if disabled then return end
shiftLock(toggle and toggle or not shiftlock)
end
function CustomShiftLock.disable(val)
disabled = val and true or false
if disabled then
shiftLock(false)
end
end
return CustomShiftLock
Local Script inside StarterGui (It can be placed in PlayerScripts or CharacterScripts)
local uis = game:GetService("UserInputService")
local shiftlock = require(game:GetService("ReplicatedStorage"):WaitForChild("CustomShiftLock"))
uis.InputBegan:Connect(function(input,processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.LeftShift then
shiftlock.enable()
end
end)
And to disable the shift lock (and it wont be able to be turned on until you enable it again) just do:
shiftlock.disable(true) -- to disable
shiftlock.disable(false) -- to enable
Its not perfect as it will look a bit choppy when you turn fast, but I dont think there is a way to fix that (you could remove CameraOffset to make it look smooth, but then camera will be in the middle rather than on the side)