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

TextButton to disable a GUI sometimes works, sometimes doesn't. Why?

I honestly don't know how else to explain this with more detail. Sometimes I can click the button and the GUI disables, sometimes the button doens't even change appearence when hovering my mouse over it.

Here is the script:

function Clicked() 
	script.Parent.Parent.Enabled = false
end
script.Parent.MouseButton1Down:connect(Clicked) 

3 comments

0

If the button is supposed to change its appearance when your mouse is hovered over it, where's the script for that?

0

use this

1 answer

First, you probably shouldn't specify it as a function like that, do something like

script.Parent.MouseButton1Down:connect(function()

1 comment

0

why does it matter?

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