Hello, I am making a speedrun mechanic for my game and whenever the player steps in the speedrun part box, a gui appears whether they would like to speedrun or not. It works just fine, however when they begin the speedrun, then click “exit” button, and then go back to speedrun, the gui doesn’t appear anymore. Here is my current code:
local requirementstage = 20
local text = "Would you like to speedrun the easy section?"
game.Players.PlayerAdded:Connect(function(plr)
script.Parent.Touched:Connect(function(hit)
if hit.Parent == plr.Character and plr.leaderstats.Stage.Value >= requirementstage then
plr.PlayerGui.SpeedRun.SpeedRunFrame.SpeedRunConfirmText.Text = text
plr.PlayerGui.SpeedRun.SpeedRunFrame.Visible = true
end
end)
end)