Hey! I am Domderp999. I am having problems with Color3 on a TextLabel.
Could somebody explain why this errors?
Hey! I am Domderp999. I am having problems with Color3 on a TextLabel.
Whatâs the error youâre getting?
I dont get an error⌠Its weird.
Can we see more of the code please because there is nothing wrong with this part of the code.
Oops! It appears I found the issue. It was under a fire event, I thought the changing color part was the part that failed.
If you show the code i may be will be able to solve it.
Umm I donât know any scripts, so Iâll remake it from scratch.
On a local script and the parent is the Textlabel
script.Parent.TextColor3 = Color3.fromRGB(0,0,255) -- change to anything
script.Parent.TextStrokeColor3= Color3.fromRGB(0,255,0) -- change to anything
I tested and it worked, make sure its not a normal script because GUI runs on the client.
I think you should be using âColor3.newâ instead of âColor3.fromRGBâ.
fromRGB should work too though.
Anyways, it seems like the OP may have solved it.
Do /255 on all of the values so for example
script.Parent.TextColor3 = Color3.new(255/255, 98/255, 98/255)
script.Parent.TextStrokeColor3 = Color3.new(168/255, 64/255, 64/255)
Thatâs no different from using the fromRGB constructor, which is much cleaner to read in code if youâre working with 0-255 values. In fact, thatâs why the fromRGB constructor exists, so you can avoid doing this. You have to evaluate three division operations before the Color3 object is created.
Use this :
script.Parent.TextColor3 = BrickColor.new(âname of the colorâ)
script.Parent.TextStrokeColor3 = BrickColor.new(âname of the colorâ)
4 years for see working comment, LOL