Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Color3 = Color3.new error ')' expected near 'r'?

Asked by 6 years ago

Ello, I am trying to make a TextLabel TextColor3 change, I've tried using.

script.Parent.Color3 = Color3.new(0 r, 11 g, 225 b) 

But the console throws an error, here is the error.

PlayerGUI.GUI.Text.Script:3: ')' expected near 'r'

GUI is the name of the GUI that the text is in.

Text is the text that I want to change color.

I am using a script.

Filtering is disabled.

Any help would be appreciated, thanks!

1
Color3.fromRGB(0, 11, 225) is your answer. All 3 arguments are meant to be numbers, no letters needed. Also, use .fromRGB, as .new can only be numbers from 0 to 1, and you would have to divide the numbers by 255. UgOsMiLy 1074 — 6y

2 answers

Log in to vote
0
Answered by
Meqolo 78
6 years ago
script.Parent.Color3 = Color3.new(0, 11, 225)

the r, g and b letters u added just confused the code

Ad
Log in to vote
0
Answered by 6 years ago

You're confusing yourself with integers. Use one of these.

script.Parent.Color3 = Color3.new(0, 11, 225)
script.Parent.Color3 = Color3.fromRGB(0, 11, 225)
script.Parent.Color3 = Color3.fromHSV(0, 11, 225)

Answer this question