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

Help with Gui visible?

Asked by
FiredDusk 1466 Moderation Voter
8 years ago

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

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

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)
Ad
Log in to vote
1
Answered by
NotSoNorm 777 Moderation Voter
8 years ago

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
0
Forgot ")" FiredDusk 1466 — 8y

Answer this question