Overhead GUI - The color of textlabel doesn't change

What if you test every single statement?
Like:

if Player.TeamColor == "White" then
   print("White Team!")
end

By doing this, you may know if the problem is getting the player’s team or setting the color.

@jumbopushpop112 Wrong, he needs it.

I think it is because Color3 only accepts a number from -255 to 255.

Well, when I deleted the script from the line, the code malfunctioned. An blue line appeared under the OverheadGui text.

I tried using Color3.new using the color choosing frame, I placed the BrickColor codes inside and clicked on “OK”, so the Color3.new values were created by the roblox’s tool and I don’t think it’s about that. Could it be about server-client issues?

As I said, the numbers on your Color3.new() is a decimal. Color3.new only accept a number from -255 to 255. It cannot be a decimal.

1 Like

An example from Roblox Developer hub:

There’s a frame that says Color3:ToHSV usage which includes decimal numbers just like mine.

Why are you using decimals tho? You can just go to the BrickColor Codes page and get the RGB code from there, then you can use, as I said, Color3.fromRGB(R,G,B) to set the TextColor3.

Yeah, I also did that but the thing is both gave me the same result. It’s easier to just use Color3.fromRGB but it gives me the same result as if I were using Color3.new, both are not working.

Hmm, I’m out right now so I will be able to create a code to help you in a few hours. Good luck meanwhile.

Alright, thank you for assisting me through this issue.

1 Like

This may be a dumb try but since you included a string on the color variable, you can remove the “TextColor3” and replace the if statements that turn the textcolor3 to the team color like “color.TextColor3 = Color3.new(n, n, n)”

Also, i recommend you use RGB since it’s simple but easy for some stuff.

Wait wait, why are you changing the color inside the script? You wrote local color = script.OverheadGui.InformationLabel.TextColor3 instead of local color = InformationLabel.TextColor3.

You are changing the textcolor3 of the overhead template inside the script instead of the cloned gui, this is the bug.

@MrAz18485

I wrote that when I made up my post, and that didn’t really work. People suggested me to write down the directory of InformationLabel then change the textcolor manually for every if else statement, and that did not work either.

When you tested it, what did you see only with the script before you asked for help?

Like the script you posted on the top.

Edit: Also, what is the information label’s text color in studio?

Well, at output console, there was simply no errors about this script. The textcolor of the label is 38, 38, 38.

I meant that if you go in play test mode, then look at your overhead gui above the head, what do you see?

Well, it shows up my rank and name, which is good (Name - Rank). However, the text is written as black and not as the teamcolor of the team that I’m in.

Here is the problem.

You are changing the Original GUI color instead of the Cloned GUI color.

Do this instead:

local InformationLabel = Character.Head:WaitForChild("GUI NAME")

So that means, if inside the console is no errors, but nothing would change and it’s still the same color, that means only one thing, nothing in the script is broken but the type of color function yo used, i don’t use Color3.()much, but if you use Color3.fromRGB() and change some numbers in it, it could probably work.

I saw some posts where some person said to use color3.fromRGB more than color3.new since it’s more stable and easier, i think you should try it.

My bad if i don’t get something right but isn’t there something in the script dissimilar to that but the same? image