function turnOrange()
script.Parent.TextColor3 = Color3.new(255, 162, 0)
script.Parent.Parent.CustomClass1.TextColor3 = Color3.new(255, 255, 255)
script.Parent.Parent.CustomClass2.TextColor3 = Color3.new(255, 255, 255)
script.Parent.Parent.CustomClass3.TextColor3 = Color3.new(255, 255, 255)
script.Parent.Parent.CustomClass4.TextColor3 = Color3.new(255, 255, 255)
end
script.Parent.MouseButton1Down:connect(turnOrange)
rather than putting this in all my buttons and changing the numbers, is there a better way to write this script so that when a player clicks ona certain textbutton the textbutton will turn orange while the others stay white? also its suppose to turn orange but it keeps turning yello any ideas..the color for orange is 255, 162, 0 but it changes to yellow

5 comments
This is really intense, I'm still starting off, and I don't really get how to use arguments and parameters and pairs etc, can you send me links on where I could learn all of this and I'll be able to understand this script better
Also is it possible to write it without any arguments, would it be slower/longer?
It's possible, but it's better just to pass it onto a separate function; learning how to use them will be very beneficial for you.
soo i learned abou the arguments and pairs and stuff and i edited my script and it works but the one problem is when i click the text button it turns yellow not orange, ive cheked the number for orange and everything but it turns yellow only and do i need this script in all of my buttons or just 1?
You put the script in the frame with all the buttons, you don't put it in a button.