local frame script.Parent.Parent.Shop
script.Parent.MouseButton1Click:connect(function()
if frame.Visible == false then
frame.Visible = true
else
frame.Visible = false
end
end)
✓ ANSWER ACCEPTED
Why is the script statement underlined red?
2 answers
✓ Accepted answer
local frame=script.Parent.Parent.Shop -- forgot an equal sign :P
script.Parent.MouseButton1Click:connect(function()
if frame.Visible == false then
frame.Visible = true
else
frame.Visible = false
end
end)
An underline in red simply means a syntax error. Just because I didn't really like that the last answer didn't really say anything about it, I'll mention that you can toggle "Script Analysis" in View and it'll define errors for you and explain what's going on. Another thing is you can hover over text with red underlines and it'll describe the problem, somewhat.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Ty. ;)