Setting TextColor3 not working?

I’ve been trying to set TextColor3 for 2 hours now, it just won’t set. I can change any other value in the TextButton that are intended to be changed, but not TextColor3. Attempting to set TextStrokeColor3 the same way as I would set TextColor3 is successful.

Here’s what I am doing:

script.Parent["1"].TextColor3 = Color3.fromRGB(110,153,202)
script.Parent["1"].TextStrokeColor3 = Color3.fromRGB(110,153,202)
script.Parent["1"].Text = "ABC"

And here is the result:

I tried to reproduce this using your code and it works just fine - this suggests that either that part of your code isn’t running, or that the TextLabel you’re changing isn’t the same one that you took that screenshot of.

Take a look this comparison.rbxl and compare it to yours. If you still can’t figure it out, attach a file that reproduces your issue and I’ll take a look for you.

1 Like

The code runs fine, I have already tested that. I’m also 100% sure it’s the correct TextButton, as 1, it’s the only Text that displays “ABC” and should change to that color, 2, the path is the exact same, as the others, which do work.
I’m not unable to upload the file, as I am making this for someone, and getting paid for it, and I assume they wouldn’t want it free for anyone to take.

It’s hard to help you with your issue without seeing more of the code or a repro file. If you can’t make a minimal version of the file that reproduces the issue (just some of the code and the relevant gui objects), then feel free to DM me if you’d feel more comfortable doing that. I’ll then reply to this thread with what the solution was for future reference.

Is the text button itself modified in any way? Maybe changing its Active property to false or something similar.

You could also try using a Text Label, small thing but it may make a difference.

Still don’t know what the issue was, but I did something else, and it worked. I set TextColor3 to be another GUI element’s TextColor3. The problem with this is it won’t help anyone else who might stumble into this problem, as this just happened to be another (and easier) way for me to get what I needed.

1 Like

What is the TextLabel’s Text property set to before this code runs?

This completely worked for some reason! I was helping someone and I came across this that I wanted to fix, but it always popped up as a color that resembled the dark tone of black, though the text was white! I based the text color off of a Color3Value and it seemed to work! :face_with_monocle: