I want to make a button that changes color once I click it and reverts back to normal once I click it again. I made a script, it does not work. Here is the script.
function leftClick()
script.Parent.TextColor3 = Color3.new(0, 255, 0)
end
function leftClick()
script.Parent.TextColor3 = Color3.FromRGB(255,0,0)
end
script.Parent.MouseButton1Click:Connect(leftClick)

3 comments
There was a mistake on your script, I fixed it. You forgot to make local on = true, if not not on.
oops! yeah, sorry about that
I fixed the script