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

Help with Gui visible?

When I click the TextButton, the Frame does not go invisible. Dont worry about getting the parents to guis.

Clicked = script.Parent.MouseButton1Down


script.Parent.MouseButton1Down:connect(function(Clicked)

if Clicked then
	
	script.Parent.Parent.Visible = false	
	
end

2 answers

✓ Accepted answer

Well, MouseButton1Down isn't a bool value, so you can't put an in statement using it. It's an event that's fired.

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

Again, We don't need to define clicked as for it's already defined when the function gets called

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

1 comment

0

Forgot ")"

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