When the player joins the game the camera is supposed to be locked into a part and the player has no control over it. Sometimes the script bugs out and stop working and the player has their camera and can control it. What could be causing this problem?
local player = game.Players.LocalPlayer
local Character = player.Character
local camera = workspace.CurrentCamera
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = workspace.CameraPos.CFrame

3 comments
Try removing the character variable since you're not using it
how could this be the cause?
It might not be, but try removing unnecessary bits of code like that variable in case you decide to define a variable and use that stray variables name