I know you have to use something about player died or something but i don't know how to make it so that one GUI doesn't continuously clone back in the player gui because i have a script where it clones a gui when a player is added to the game.
Do i need to use something with characteradded or something im having troubles with player died
If you want something to occur when someone dies, just use the Died
event of a Humanoid.
If you clone are cloning a GUI and don't want it when a player dies, make sure it is being cloned when the Player joins the Players
and not when the Character is added into workspace.
More events of the Humanoid can be found here.
game:GetService('Players').PlayerAdded:connect(function(player) --I would clone the GUI here, or just have it in the StarterGuis player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() print(player.Name .. " has died!") --Anything else you want to happen can be here end) end) end)
If I have helped answer your question please remember to accept my answer. Otherwise, feel free to message me or comment on my answer on how I could have better helped. Thanks!