My intermission will be a textbox that opens up when a player hits a textbutton. Unfortunately, my intermission bar just stays hidden even after I click.
local button = script.Parent local intermission = game.StarterGui.intermission.TextBox intermission.Visible = false local function close(click) local title = script.Parent.Parent.Title local description = script.Parent.Parent.TextBox local click = script.Parent.MouseButton1Click if button and click then title:Destroy() description:Destroy() button:Destroy() game.StarterGui.Greeting:Destroy() intermission.Visible = true end end button.MouseButton1Click:Connect(close)
P.S. I want to make a GUI similar to Natural Disaster Survival, I may have more questions coming soon.
You're issue is you're trying to get the StarterGui's Gui, Therefor, that's why it's not erroring; Because technically it is working. Just not for the PlayerGui
If you're wanting to get a playerGui while the game is active you need to use playergui
local Player = game.Players.LocalPlayer local PlayerGui = Player:WaitForChild('PlayerGui') local intermission = PlayerGui:WaitForChild('intermission').TextBox