Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

TextButton Popup GUi not appearing?

(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)

2 comments

0

You need to be accessing the players gui and not the StarterGui.

0

ah, ok

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.