ok so i want to have the gui color change upon this button being clicked by the player so they get to choose the color they want the gui to be i have this script inserted into the button on the screen script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.CoinLabel.BackgroundColor3 = 255, 0, 0
this should change it to red but it apears i dont know what im doing and have done something wrong. if you could tell me what i did wrong so i can fix it that would be good. im pretty sure its the part where its BackgroundColor3 = 255, 0 , 0 but idk what to add to that to make it work.
The issue is that you are trying to assign
255. Remember that in multiple assignment, additional results get discarded.
When there are more expressions than variables:
local variable = 1, 2;
variable is assigned to
2 is silently discarded.
A similar thing happens when there are more variables than expressions:
local variable, variable2 = 1;
variable2 is just
fromRGB constructor function found in the
script.Parent.Parent.Parent.CoinLabel.BackgroundColor3 = Color3.fromRGB(255, 0, 0);