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

then expected near = ?

Asked by 10 years ago

f = false

MouseButton1Click:connect(function() if Script.Parent.Text="Menu" then Script.Parent.Parent.FindFirstChild.Visible=true

 Script.Parent.Text="Exit" then
Script.Parent.Parent.FindFirstChild.Visible=f 

end

Can someone help me understand this error?

1 answer

Log in to vote
0
Answered by 10 years ago
if Script.Parent.Text=="Exit" then
Script.Parent.Parent.Visible=f
end

You forgot your 'if' and you were also using a single equals to compare. You must use a double equals sign to compare values.

Also, I have no clue if you have 'f' defined or not.

0
Thanks! mario77676 5 — 10y
Ad

Answer this question