so, i was scripting and i noticed that it wanted me to put an end near "else", i tried doing that in many different ways and nothing worked. can someone help me out and correct my code?
script.Parent.MouseButton1Click:Connect(function()
script.Parent.ColorGradientFrame.Visible = true
script.Parent.ColorGradientFrame2.Visible = true
script.Parent.DarknessGradientFrame.Visible = true
script.Parent.DarknessGradientFrame2.Visible = true
else
script.Parent.ColorGradientFrame.Visible = false
script.Parent.ColorGradientFrame2.Visible = false
script.Parent.DarknessGradientFrame.Visible = false
script.Parent.DarknessGradientFrame2.Visible = false
end)

1 comment
You include else on line 6 but there is no if statement, that is the problem. Try replacing every true on lines 2-5 with "not script.Parent.blah.Visible". If Visible = true, it will turn false since not true = false. If Visible = false, it will turn true since not false = true