I'm a beginner so bear with me. I have made it so when I click a block a shop gui pops up. Now I want to close it with a text button. I want to use gui.Enabled = false in an if statement but i'm not sure exactly what to put in. Help would be appreciated.
COMMUNITY QUESTION
How do I close a text button with gui.Enabled = false?
1 answer
This should work, if not please don't hesitate to contact me.
button.MouseButton1Click:connect(function()
gui.Enabled = false
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
There is just one problem with this solution that I'm also not sure how to fix. The button part of button.MouseButton1Click:connect(function() is not declared globally or locally. I'm not sure what to put to declare it.
Did you give the button a variable?