I dont know why this doesnt work. The CameraPart exist is the serverstorage. You can also see this as toggling shiftlock but with a script
wait(5)
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
Player.CharacterAdded:Wait()
local part = game.ServerStorage.CameraPart:Clone()
part.Parent = game.Workspace
part.Name = Player.UserId
part.Anchored = true
part.Transparency = 1
part.CanCollide = false
part.Orientation = Vector3.new(-13.61, 0, 0)
part.Position = Character.HumanoidRootPart.Position + Vector3.new(2.787, 2.608, 3.825)
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = game.Workspace[Player.UserId].CFrame

3 comments
First thing. Since this script manipulates the player's camera, it has to be inside of the local script. Since the camera is all hosted by clients, trying to get the camera from normal script will return an error. Second thing. If this code is inside local script, you won`t be able to access the serverstorage because that is only accessable by server, not client.
Oops got second thing lol
However this does not fix the code