Shift lock doesn't work with current camera script

I made this smooth camera script

-- Services
local rS = game:GetService("RunService")
local tS = game:GetService("TweenService")

-- Variables
local camera = game.Workspace.CurrentCamera
local root = script.Parent:WaitForChild("HumanoidRootPart")
local cameraPart = Instance.new("Part")
local newPos

-- Script
cameraPart.Anchored = true
cameraPart.CanTouch = false
cameraPart.CanCollide = false
cameraPart.Parent = game.Workspace
cameraPart.CFrame = CFrame.lookAt(root.CFrame.Position + Vector3.new(0, 7, 12), root.Position)

camera.CameraType = Enum.CameraType.Scriptable

rS.PostSimulation:Connect(function(dt)
	cameraPart.Position = cameraPart.Position:Lerp(root.Position + Vector3.new(0, 7, 12), dt * 5)
	camera.CFrame = cameraPart.CFrame
end)


But I can’t shift lock with the script enabled. I think it’s because I set the camera type to scriptable. I would appreciate it if someone could help me find a way to work around this!

1 Like

This tutorial covers shift lock too.

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