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

Why isnt my "Click button to open frame" thing not working?

Asked by 8 years ago

So, i've tried doing this a few times but it just hasnt been working, can some one please tell me if im doing any thing wrong & how to fix it.

Box = script.Parent.Box

Button = script.Parent.Button

Button.MouseButton1Down:connet(function() if Box.Visible=true then Box.Visible=false Button.Text="Information" else Box.Visible=true Button.Text="Close" end end)

There is my script.

0
Fixed it. It was a small typo. epiczombiehunter232 0 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Well, you could make it even simpler than that.

Box = script.Parent.Box

Button = script.Parent.Button

Button.MouseButton1Down:connet(function()
    if Box.Visible=true then
        Box.Visible=false
        Button.Text="Information"
    else
        Box.Visible=true
        Button.Text="Close"
    end
end)
Ad

Answer this question