Why doesn't this work after a player respawns? The LocalScript is located inside the PlayerGui.

repeat wait() until game:GetService("Players").LocalPlayer

local Player = game:GetService("Players").LocalPlayer
local Playing = Player:WaitForChild("Playing")
local Character = Player.Character
local Humanoid = Character:FindFirstChild("Humanoid")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Timer = ReplicatedStorage:WaitForChild("Timer")
local MapHolder = workspace:WaitForChild("MapHolder")
local SelectedMap = ReplicatedStorage:WaitForChild("SelectedMap")
local Database = script.Parent:WaitForChild("Database")

local CurrentCamera = workspace.CurrentCamera

Angle = 0
while wait() do
	if Timer.Value > 0 and Playing.Value == false and Humanoid and Humanoid.Health > 0 and Database.Visible == false then
		CurrentCamera.CameraType = "Scriptable"
		CurrentCamera.CameraSubject = MapHolder:FindFirstChild(SelectedMap.Value):FindFirstChild("PartCAM")
		CurrentCamera.CoordinateFrame = CFrame.new(MapHolder:FindFirstChild(SelectedMap.Value):FindFirstChild("PartCAM").Position) * CFrame.Angles(0, Angle, 0) * CFrame.new(0, 0, 25)
	elseif Timer.Value < 0 or Database.Visible == true and Playing.Value == false and Humanoid and Humanoid.Health > 0 then
		CurrentCamera.CameraType = "Scriptable"
		CurrentCamera.CoordinateFrame = CFrame.new(workspace.Scene:FindFirstChild("PartCAM").Position) * CFrame.Angles(0, Angle, 0) * CFrame.new(0, 0, 10)
		CurrentCamera.CameraSubject = workspace.Scene:FindFirstChild("PartCAM")
	elseif Timer.Value > 0 and Playing.Value == true and Humanoid and Humanoid.Health > 0 then
		CurrentCamera.CameraType = "Custom"
		CurrentCamera.CameraSubject = Humanoid
	end
	Angle = Angle + math.rad(0.5)
end