Why does this not work? Help!

script.Parent.ChangeMode.MouseButton1Click:connect(function() on = not on if on then script.Parent.ChangeMode.Text = "On" script.Parent.ChangeMode.ImageLabel.BackgroundColor3 = {0,170,0} else script.Parent.ChangeMode.Text = "Off" script.Parent.ChangeMode.ImageLabel.BackgroundColor3 = {255,0,0} end end)

Thanks!

2 comments

0

Instead of doing 'BackgroundColor3 = {0,170,0}', do 'BackgroundColor3 = Color3.new(0,170,0)', and sorry that I failed to give an explanation, but I don't know how to explain it. Haha! :0

0

Thanks!