This is the script I have, but it doesn't do anything.
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Visible = false script.Parent.Parent.Parent.TextButton.Visible = true end
I tried in a normal script, and a LocalScript but neither work. Thank you in advance. I'm pretty new to scripting with GUIs so if this is kind of an obvious question and/or fix, that's why.
You're trying to connect and do a function at the same time. I rewrote this script for you, it should look something more like
function MouseButton1Click(x,y) script.Parent.Parent.Visible = false script.Parent.Parent.Parent.TextButton.Visible = true end script.Parent.MouseButton1Click:connect(MouseButton1Click)
Basic structure for opening and connecting functions is
function FunctionName (FunctionParameters) --Parameters can differ, usually are numbers or something that represents numbers, like wait(5) waits for 5 units-- WHATTHEFUNCTIONDOES end INPUT:connect(FUNCTIONNAME) --Input as in what triggers it to what connects it--