Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

TextButton Popup GUi not appearing?

Asked by
AAzterr 27
5 years ago
Edited 5 years ago

(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)
0
You need to be accessing the players gui and not the StarterGui. User#5423 17 — 5y
0
ah, ok AAzterr 27 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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.

Ad

Answer this question