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

Why does this function line have an error?

Asked by 9 years ago

Line 13 (the function line) is erroring and says " ')' expected near '' "

a = script.Parent.Frame
b = script.Parent

function run()
if a.Visible == false then
a.Visible = true
b.Text = "<"
else
a.Visible = false
b.Text = ">"
end

script.Parent.MouseButton1Down:connect(r­un)

2 answers

Log in to vote
2
Answered by
Link43758 175
9 years ago

Try this:

a = script.Parent.Frame
b = script.Parent

script.Parent.MouseButton1Down:connect(function()
if a.Visible == false then
    a.Visible = true
    b.Text = "<"
else
    a.Visible = false
    b.Text = ">"
end))
Ad
Log in to vote
0
Answered by
Adryin 120
9 years ago

He needed an extra end I think.

Answer this question