Gui that should not be visible is visible

I’ve almost finished a silly game I’ve been working on but I’ve run into a major problem.
After the game runs it needs to be reset so I just remove the play button and add a new play again button, the issue is that the play again button only stays visible for a few seconds and then dissapears and the play button returns. This won’t work as it causes the player to watch a cutscene with a bunch of dead characters. The play button is never set back to visible so I don’t even know why this is happening.

Here’s how the Gui looks right after the game ends:

And here’s how it looks a few seconds later:

I originally had the buttons in the same frame but now they’re in different frames and the starter menu still shows up. I even tried destroying the play menu after the game ends but that still didn’t stop the menu.

Here’s the last few lines of the cutscene where I make the play again menu visible.

-- This is "CameraScript" script in StarterGui (see photo below)
tween (game.Workspace.PlayerCam,game.Workspace.TopCam,.5) --last tween in the cutscene
	wait(0.5) -- finishing up the cutscene
	script.Parent.ScreenGui.AfterPlay.Visible = true -- makes the play again menu visible
	script.Parent.ScreenGui.Frame.TextButton.Visible = false -- should make the play button invisible
	script.Parent.ScreenGui.Frame.Settings.Visible = false
end)

And here’s part of my Gui script that triggers a message saying the game is resetting.

-- This is "Gui Script" in StarterGui (See photo below)
playAgain.MouseButton1Click:Connect(function() --when the play again button is clicked
		game.ReplicatedStorage.PlayAgain:FireServer() --fires the event to teleport to a new server to "reset"
		endMenu.Message.Visible = true --the message that says the game is resetting
		menu.Settings.Visible = false
		startbutton.Visible = false -- startbutton is the play button for the beginning
end)

Here’s my Starter Gui folder, pardon my weird naming I type whatever comes to mind to name things.
Screenshot (11)

Simple fix, click on screengui and change RestOnspawn I think its called to disabled.

2 Likes

I completely forgot that existed! Thanks lol.