Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

button.MouseButton1Click:connect(function() 
	gui.Enabled = false
end)

2 comments

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.

0

Did you give the button a variable?

This discussion is preserved as it was. New answers, comments, and votes are closed.