Camera Manipulation gets activated once I die

So I’m making a game and when I reset, the camera manipulation gets enabled. I tried destroying the Camera Part, but it just dosent let me move my camera. Heres the scripts:

(Nt the manipulation script)



local play = script.Parent.play
local playGUI = script.Parent.Parent


local song = game:GetService('SoundService').ReRun


game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
play.Activated:Connect(function()
	warn('Entering: 2006 Archives')
	
	game.Players.LocalPlayer.Character:FindFirstChild('HumanoidRootPart').CFrame = CFrame.new(game.Workspace.TP.Position)
	playGUI:Destroy()
	song.Volume = 0.49
	game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
	game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
	game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50
	
	workspace.CurrentCamera.CameraType = Enum.CameraType.Custom -- <----------- HERE
	workspace.Terrain.Game.mainmenu.CameraPart:Destroy()
	game:GetService('StarterGui').Camera:Destroy()
	
	script.Parent.Parent:Destroy()
end)

-- 128 max - 0.5 min camerazoom

manipulation script

local Player = game.Players.LocalPlayer
local Chraracter = Player.Character or Player.CharacterAdded:Wait()

local Camera = workspace.CurrentCamera

repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable

until Camera.CameraType == Enum.CameraType.Scriptable

Camera.CFrame = workspace.Terrain.Game.mainmenu.CameraPart.CFrame

Put the cframe moving in the loop or it just moves it 1 time

I dont get what your saying. Can you please explain much further thanks

Wait oops I read it wrong. Can u show me what is happening vs what you want?

So, when the player dies, it returns back to the Camera Manipulation that I put when a player joins, but I when I die, it puts it back where it is ill put up a video

https://gyazo.com/c57a78bafcfc4a80530da9be0a59ac62 heres the video, and btw i couldnt move the camera when i died

Because u don’t detect when the player dies, it is moving the camera when u spawn in

Add

Character.Humanoid.Died:Wait() before the repeat wait() line

Edit: U actually wrote Chraracter so u might wanna fix that