Text Label not changing colour

I am trying to make the text on the text label change to the RGB colour I have set

I have looked on the developer forum but none of the solutions have been working. It’s certainly not the whole script because everything before this certain line of code works perfectly fine.

SurfaceLabel.TextLabel.TextColor3 = Color3.fromRGB(255,176,0)

This is the full script, like I said before there is no issue with anything else. I can also see no errors pop up either

local tweenService = game:GetService("TweenService")
local part = script.Parent.Part
local SurfaceLabel = game.Workspace.queue_time_lol.SurfaceGui
local Queuetimes = game.Workspace.control.Main.queuetimes
script.Parent.Part.ClickDetector.MaxActivationDistance = 3 

local tweeningInformation = TweenInfo.new(
   
	0.3,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0.5,  
	true,
	0.1 
)
 
local partProperties = {
    CFrame = script.Parent.moved.CFrame
}

 
local Tween = tweenService:Create(part,tweeningInformation,partProperties)





script.Parent.Part.ClickDetector.MouseClick:Connect(function()
	Tween:Play()

    SurfaceLabel.TextLabel.Text = "45 mins"

	Queuetimes.mins5.Part.Material = "Metal"
	Queuetimes.mins10.Part.Material = "Metal"
	Queuetimes.mins15.Part.Material = "Metal"
	Queuetimes.mins30.Part.Material = "Metal"
	Queuetimes.mins40.Part.Material = "Metal"
	Queuetimes.mins45.Part.Material = "Neon"
	Queuetimes.mins50.Part.Material = "Metal"
	Queuetimes.mins55.Part.Material = "Metal"
	Queuetimes.mins60.Part.Material = "Metal"
	Queuetimes.Delayed.Part.Material = "Metal"
	Queuetimes.Closed.Part.Material = "Metal"

	SurfaceLabel.TextLabel.TextColor3 = Color3.fromRGB(255,176,0)
	
end)

This is supposed to be a simple button for a queue time board, so I apologise if it’s messy as I am not the best at scripting.

It would be great to know where I went wrong because I have been trying to find a fix for quite a while.

(This is my first topic created, so sorry if it’s a bit of a mess I tried my best)

1 Like

Does this line works fine?

SurfaceLabel.TextLabel.Text = "45 mins"

Yes it does, everything until that line of code works perfectly fine.

I dont see a mistake here… u should get this colour:

The colour remains as green, I will try to get a video sorted for you.

try setting it before u set the materials

Still does not change colour, so it is a problem with the line of code. It cannot be the local either as the text runs on the same one. The lines underneath also work, so it’s not appearing up as an error.

is it a local script or a server script

It’s just a normal script… I’m not sure if that’s local or a server script. (Sorry I am not the best scripter)
capture

just do the coloring client-sided if it doesnt work on the server

Sorry to be a pain, but what do you mean by client-sided and how do you do it?

for client-sided only clients can see that not the server but text’s they are shared client-server

you could send a signal for that

print the color after the change for me if you would.

Ah alright, how do I make it client-sided this would be helpful.

send a signal like a remote event

client won’t do anything. You can change anything on the server UI related. Even a player’s UI can be changed on the server if desired. My game has multiple player uis running on the server and it works just fine. Only difference is the input delay if it has constantly changing text.

for some reason the text color doesn’t change tho

Well then I would like a print of the textcolor afterwards. It’s important to debug code. If you’re not seeing a change it could be something in your workspace instead of the code or something you just don’t see.

I’m really sorry, I do not know much scripting at all like I said in the main post. I am trying my best but I really do not know how to print the textcolor of it. I am really sorry for being a pain. I just know the basics pretty much, I learned tweening not long ago and functions I find easy, :confused:

It’s fine, after the textcolor is changed go add this line.

tostring(SurfaceLabel.TextLabel.TextColor3)

and make sure you have the output/console open which is found in the “view” panel on studio. If you don’t have that open that might be the problem seeing as you might have an error somewhere.,