My shop GUI does not want to close. I am using a local script connected to the textbutton that is supposed to be used to close the GUI but the GUI just does not go away after it appears.
I cant seem to put a snip of the code but I'll type it out below.
game.StarterGui.ScreenGui.Frame.TextButton.MouseButton1Click:connect(function()
script.Parent.Parent.Visible = false
end)
I don't see why this isn't working but the GUI just stays there after I press the button.

3 comments
The localscript can be anywhere in the ScreenGui though
Basically, yes. Using a LocalScript inside of ScreenGui to use the button, is accepted. Because when you try to use the button from "game.StarterGUI" just won't work. The LocalScript is already inside of the needed component.
I'm new to Lua lol as you can see. Thnaks guys for the help!