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

Why is the script statement underlined red?

Asked by 6 years ago
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)

2 answers

Log in to vote
0
Answered by
shakran 23
6 years ago
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)


0
Ty. ;) SheddSky 11 — 6y
Ad
Log in to vote
0
Answered by
Tomstah 401 Moderation Voter
6 years ago

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.

Answer this question