(This is the first time I've ever scripted something for a GUi, keep that in mind.) I'm trying to make a TextButton that makes a frame popup when clicked, and have it disappear if clicked again, how do I do this? In my current script, I inserted this LocalScript inside the TextButton. (I also apologize if this code block looks horrendous, I'm trying to get used to this new editor.)
menuopen = game.StarterGui.TPStuff.FullMenu.Visible thegui = game.StarterGui.TPStuff script.Parent.Mouse1Click:connect(function() if menuopen == false then thegui.FullMenu.Visible = true elseif menuopen == true then thegui.FullMenu.Visible = false end end)
Like kingdom is saying, you must access the players GUI. Which is PlayerGui. You are trying to access something that won't change anything as it is not inside the player.