When this button is clicked, it will do some code depending on what color it was when it was clicked(I will put the code in later) and then change it's color from green to red, or red to green. But, this script wont work as itis right now.
function onClicked()
--If the button is green, make it red.
if script.Parent.BrickColor == "Bright green" then
script.Parent.BrickColor = BrickColorNew "Bright red"
--if the button is red, make it green.
elseif script.Parent.BrickColor == "Bright green" then
script.Parent.BrickColor = BrickColorNew "Bright red"
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 comment
Hmm.. Still doesn't work, and I got no output.