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

How do I close a text button with gui.Enabled = false?

Asked by 4 years ago

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.

1 answer

Log in to vote
0
Answered by
ImTrev 344 Moderation Voter
4 years ago
Edited 4 years ago

This should work, if not please don't hesitate to contact me.

button.MouseButton1Click:connect(function() 
    gui.Enabled = false
end)
0
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. Juansirdudefam 24 — 4y
0
Did you give the button a variable? Auxatier 59 — 4y
Ad

Answer this question