I am trying to disable two GUIs and only load one.. when a button is clicked the previously loaded GUI will disappear/disable and then one other GUI will appear, the same will happen to this one as well, a button clicked will disable that GUI and activate another, then that GUI will disappear and none will be there. The problem I'm having is none of the GUIs disappear whatsoever, they're all still there.
local discla = game.StarterGui.Disclaimer.Disclaimer
local Main = game.StarterGui.MainMenu.MainMenu
local Note = game.StarterGui.NoteFromJoey.NoteFromJoey
Note.enabled = false
Main.Enabled = false
discla.Enabled = true
local button = game.StarterGui.Disclaimer.Disclaimer.TextButton
button.MouseButton1Click:Connect(function(plr)
discla:Destroy()
print("Uh")
end)
button.MouseButton1Click:Connect(function(plr)
Main.Enabled = true
end)
local play = game.StarterGui.MainMenu.MainMenu.Menu.PlayBTN
local Quit = game.StarterGui.MainMenu.MainMenu.Menu.Quit
play.MouseButton1Click:Connect(function()
Main:Destroy()
Note.Enabled = true
end)
Quit.MouseButton1Click:Connect(function()
game.Players.LocalPlayer:kick("Quit Game")
end)
local old = game.StarterGui.NoteFromJoey.NoteFromJoey.Pages.OldPage
old.MouseButton1Click:Connect(function()
Note:Destroy()
end)
I am VERY new to coding, so I most likely did something wrong, but of course, I do not know what. I have three folders, each of them has its own GUI in it.

1 comment
You used :Destroy(). This removes the object from existence so you will not really be able to have it visible as it will actually destroy the object. Try something else like changing Enabled to true. Also you see that they are still in startergui because when a player joins it attaches those guis to playergui. So the startergui folder isn't affected at all by your code