I have a loading screen a game im making which triggers a bunch of remote events when it finishes like starting cut scenes and stuff
the issue im having is that when the player dies, it plays the loading screen again and runs the remote events which play the cutscenes again which i dont want. Could somebody please help
here is the script
local Loadingscreen = script.Parent.Frame
local player = game.Players.LocalPlayer
game:GetService(“StarterGui”):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
Loadingscreen.Visible = true
repeat wait() until player.Character ~= nil
game:GetService(“ContentProvider”):PreloadAsync({workspace, player.PlayerGui})
Loadingscreen.TextLabel.Text = “Loading Complete”
wait(1)
game:GetService(“StarterGui”):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
script.Parent:Destroy()
game.ReplicatedStorage.Remotes.Loaded:FireServer(player)