myScreenGui = script.Parent -- you're path
game.Players.PlayerAdded:Connect(function(player)
if not player then repeat wait() until game.Players.LocalPlayer end
player.CharacterAdded:Connect(function(character)
if not character then repeat wait() until player.Character end
if not player:FindFirstChild("PlayerGui") then repeat wait until player.PlayerGui end
for i,v in pairs(player.PlayerGui:GetChildren()) do
if v.Name == myScreenGui.Name then
ScreenGui = v
else
return
end
end
if character.Humanoid.Died:Wait() then
character.Humanoid.Died:Connect(function()
if ScreenGui.ResetOnSpawn == false then ScreenGui.ResetOnSpawn == true
end
if ScreenGui.ResetOnSpawn == true then
2 comments
After they click the button, will the gui show ever again?
No the GUI doesnt even go away