Camera Script not working when character is loaded manually

I have this script that moves the camera around, it continues working when the player dies but not when the player is reloaded with :LoadCharacter(

--Get service needed for events used in this script
local RunService = game:GetService("RunService")	

-- Variables for the camera and player
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
-- Constant variable used to set the camera’s offset from the player
local CAMERA_OFFSET = player.Character:WaitForChild("CameraOffset").Value

camera.CameraType = Enum.CameraType.Scriptable

local debounce = false
local function onRenderStep()

	local success , err = pcall(function()

		if debounce == false then
			debounce = true

			if player.Character:FindFirstChild("HumanoidRootPart") then

					local CAMERA_OFFSET = player.Character:WaitForChild("CameraOffset").Value
					local playerPosition = player.Character.HumanoidRootPart.Position
					local cameraPosition = playerPosition + CAMERA_OFFSET

					-- make the camera follow the player
					camera.CoordinateFrame =, playerPosition)
					camera.CFrame = CFrame.fromMatrix(

			debounce = false
	if not success then warn(err) end

RunService:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onRenderStep)

But why though