local plr = game.Players.LocalPlayer
local Frame = game.StarterGui.menuGui.mainFrame
if plr.TeamColor == BrickColor.new ("Ghost grey") then
Frame.Visible = true
else
Frame.Visible = false
end
I get this error:
17:42:27.485 - Workspace.teamDefinitions:4: 'then' expected near '<eof>'
I have no clue what I'm doing wrong, someone please help!

3 comments
I'm not sure about your error, but I'm sure that you are changing the wrong Gui. local Frame should be "local Frame = plr.PlayerGui.menuGui.mainFrame;"
Be careful of the gap in between "BrickColor.new" and "("Ghost grey")"
You're editing the Frame in StarterGui, not the Player's Frame. @XXahraternotXX Tells you the solution.