So im using a camera delay script for my game and whenever i use shift lock the character does not rotate with the character.
camera delay script is here:
--SERVICES--
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
--ASSETS--
local torso = script.Parent.Head
local center = Instance.new("Part")
center.Name = "Camera"
center.Transparency = 1
center.CanCollide = false
center.Orientation = Vector3.new(0,0,-2)
center.Size = Vector3.new(1,1,1)
center.Position = torso.Position
center.CFrame = CFrame.new(Vector3.new(0,0,0),Vector3.new(0,0,-1))
center.Parent = script.Parent
--
local bp = Instance.new("BodyPosition")
bp.D = 500
bp.position = center.Position
bp.maxForce = Vector3.new(100000000000000000000000000000000000000000000000000000000000000000000, 200000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
bp.Parent = center
--
local cam = game.Workspace.CurrentCamera
cam.CameraSubject = center
cam.CameraType = Enum.CameraType.Custom
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
--VARIABLES--
lockCamera = false
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
while torso.Parent do
wait()
center.BodyPosition.position = torso.Position
if lockCamera then
cam.CoordinateFrame = CFrame.new(Vector3.new(center.Position.x + distance,center.Position.y + height,center.Position.z))
end
end
Issue here: