function whenClicked()
local prim1 = game.Workspace.StarterCar.Red1
local prim2 = game.Workspace.StarterCar.Red2
local prim3 = game.Workspace.StarterCar.Red3
local prim4 = game.Workspace.StarterCar.Red4
local prim5 = game.Workspace.StarterCar.Red5
local prim6 = game.Workspace.StarterCar.Red6
local prim7 = game.Workspace.StarterCar.Red7
local prim8 = game.Workspace.StarterCar.Red8
local prim9 = game.Workspace.StarterCar.Red9
prim1.BrickColor = BrickColor.new("Deep Orange")
prim2.BrickColor = BrickColor.new("Deep Orange")
prim3.BrickColor = BrickColor.new("Deep Orange")
prim4.BrickColor = BrickColor.new("Deep Orange")
prim5.BrickColor = BrickColor.new("Deep Orange")
prim6.BrickColor = BrickColor.new("Deep Orange")
prim7.BrickColor = BrickColor.new("Deep Orange")
prim8.BrickColor = BrickColor.new("Deep Orange")
prim9.BrickColor = BrickColor.new("Deep Orange")
end
end
script.Parent.MouseButton1Down:connect(whenClicked)
The goal of this script is to change the colour of a brick when a button is pressed (it starts off as red but when the button is pressed it should be orange). The button element of the script works fine, when ever I press the button the colour changes however it changes to white instead of orange. I have also tried using the number values for the colour but it still will not work, can anyone help me?

7 comments
There is a lot of errors in that script, can you fix them and post the clean version?
Did you name your parts names to Red? Or no?
Yes I did. Here is the error: Players.Player.PlayerGui.Garage.Frame.OrangePrim.PrimaryColourChange:35: ')' expected (to close '(' at line 1) near ''
Updated code.
The script works, but the colour changes to white.
Because Deep orange is spelled with a Lower case 'o'
Thank you, it works perfectly now!