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

Why does this function line have an error?

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

✓ Accepted answer

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))

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