How do make a Gui popup after you die and respawn and the GUI is still there I tried this
game.Players.LocalPlayer.Character:WaitForChild('Humanoid').Died:connect(function() script.Parent.Frame.Visible = true end)
and yes it works but it disappears after the player respawns, So I heard you can tweak player's respawn time in This article so what if I set the respawn delay to like 100000 and if the Gui button is pressed the delay will be set to 0.1 or something like that, I don't know how to do all of this stuff so if you could explain it to me or solve it will be greatly appreciated
There is a property in every GUI called "ResetOnSpawn". You can set it to true by checking the box, or you can set it to true in a script.
script.Parent.ResetOnSpawn = true
Edit: I just saw what you commented and I hope this is what you were looking for. Feel free to ask questions or say something.
local Player = game.Players.LocalPlayer Player.Character:WaitForChild('Humanoid').Died:Connect(function() -- Remember to capitalize the C in Connect, as "connect" is deprecated script.Parent.Frame.Visible = true while true do wait(1) script.Parent.Close.MouseButton1Click:Connect(function() script.Parent.Frame.Visible = false end) if script.Parent.Frame.Visible == false then break -- stops waiting when the Frame is not visible end end wait(0.1) Player:LoadCharacter() end)
Add a wait() to it!
game.Players.LocalPlayer.Character:WaitForChild('Humanoid').Died:connect(function() wait() -- put how long the player takes to respawn, maybe add an extra half a second to it just to be safe script.Parent.Frame.Visible = true end)