Textlabel colour changing not working

Here is my script:

local Player = game.Players.LocalPlayer
local leaderstats = Player:WaitForChild("leaderstats")
local Apps = leaderstats:WaitForChild("Apps")
local TextLabel = script.Parent
local Trained = script.Parent.Trained
local Tier1Officer = script.Parent.Tier1Officer
local Tier2Officer = script.Parent.Tier2Officer
local Tier3Officer = script.Parent.Tier3Officer
local SeniorOfficer = script.Parent.SeniorOfficer
local Trooper = script.Parent.Trooper

while true do
	if Apps.Value >= 20 then
		Trained.TextColor3 = {0, 170, 0}
	end
	if Apps.Value >= 50 then
		Tier1Officer.TextColor3 = {0, 170, 0}
	end
	if Apps.Value >= 100 then
		Tier2Officer.TextColor3 = {0, 170, 0}
	end
	if Apps.Value >= 250 then
		Tier3Officer.TextColor3 = {0, 170, 0}
	end
	if Apps.Value >= 350 then
		SeniorOfficer.TextColor3 = {0, 170, 0}
	end
	if Apps.Value >= 500 then
		Trooper.TextColor3 = {0, 170, 0}
	end
	wait(60) --Waits 60 seconds to refresh
end

When I run this , the colours stay the same.
Am I doing the colour change sequence wrong?

1 Like

You can do this:

TextLabel.TextColor3 = Color3.FromRGB(0,0,0)
2 Likes

Works , thank you!

30 characters

2 Likes