Hi guys, this is my first post on the DevForum, so please bear with me if I have chosen the wrong category, etc.
So, this may seem like a drag to all of the highly-experienced developers, but yes, I am having trouble with making a Main Menu in my game. It is working fine, but it comes back again when I respawn, which I imagine would be a bit of a problem. Here is my code:
--The variables--
local playButton = script.Parent.PlayButton
local updateLogButton = script.Parent.UpdateLogButton
local quitGameButton = script.Parent.QuitGameButton
local mainFrame = script.Parent
local updateLogFrame = script.Parent.UpdateLog
--Scripts--
playButton.MouseButton1Click:Connect(function()
mainFrame.Visible = false
end)
quitGameButton.MouseButton1Click:Connect(function()
game.Players.LocalPlayer:Kick('Thanks for playing the game. I hope you come play again.')
end)
updateLogButton.MouseButton1Click:Connect(function()
updateLogFrame.Visible = true
end)
Donāt worry about the closing UpdateLog, because thatās been handled. Here is an image of the branches:
In short, donāt change any code, but I would appreciate it if you were to add something that would stop it from coming back again when the client/player dies.
Thank you for reading, and I hope that someone can offer me a solution.