Hello, I Made A Cutscene Script That Is Supposed To Do A Intro, And It Has A GUI for the play button, anyways the problem I'm having is the cutscene plays when you die even though I have it in the script delete the UI and cutscene script and it still does it for some reason I don't know what to do I have ResetOnDeath to false on the GUI in the cutscene script itself I have it destroy itself and it still plays, this is just annoying and time consuming if anybody has a solution then please tell me, thank you for reading. here are the scripts and there both local scripts

SCRIPT 1 THE CUTSCENE SCRIPT

local TweenService = game:GetService("TweenService")

local cutscenetime = 10

local camera = workspace.Camera

local timebetweenswitch = 3

local info = TweenInfo.new(
	cutscenetime,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

function tween(part1,part2)
	camera.CameraType = Enum.CameraType.Scriptable
	camera.CFrame = part1.CFrame
	wait(timebetweenswitch)
	
	local tween = TweenService:Create(camera,info,{CFrame = part2.CFrame})
	tween:Play()
	wait(cutscenetime)
	camera.CameraType = Enum.CameraType.Scriptable
end

wait(2)
tween(game.Workspace.DummyMap.Cams.StartingCam,game.Workspace.DummyMap.Cams.EndingCam)


script.Parent.Loading.Play.MouseButton1Click:Connect(function()
	script.Disabled = true
	script:Destroy()
end)

game.Players.LocalPlayer.Character.Humanoid.Died:Connect(function()
	script:Destroy()
end)

SCRIPT 2 THE UI

script.Parent.Play.MouseButton1Click:Connect(function()
	script.Parent.fard:Play()
	script.Parent.Appear.Visible = true
	script.Parent.Play.Visible = false
	script.Parent.TextLabel.Visible  = false
	wait(2)
	for i = 1,10,1 do
		wait(0.1)
		script.Parent.Appear.BackgroundTransparency = script.Parent.Appear.BackgroundTransparency - 0.1
	end
	workspace.Camera.CameraType = Enum.CameraType.Custom
	wait(2)
	for i = 1,10,1 do
		wait(0.1)
		script.Parent.Appear.BackgroundTransparency = script.Parent.Appear.BackgroundTransparency + 0.1
	end
	script.Parent.MainMenu:Destroy()
	script.Parent.WaitForCT:Destroy()
	script.Parent.Parent.Loading:Destroy()
	game.Workspace.DummyMap:Destroy()
end)