So in my game, I have players rank up but I would like to change the colour of the text when they are able to rank up from white to a flashing red but I can’t get it to work.
local plr = game.Players.LocalPlayer
while wait() do
if (plr.leaderstats.Rank.Value*1000) +1000 <= plr.leaderstats.Sugar.Value then
while true do
script.Parent.TextColor3 (255,0,0)
wait(0.5)
script.Parent.TextColor3 (255,255,255)
wait(0.5)
end
else
script.Parent.TextColor3 (255,255,255)
end
local plr = game.Players.LocalPlayer
while wait() do
if (plr.leaderstats.Rank.Value*1000) +1000 <= plr.leaderstats.Sugar.Value then
while true do
script.Parent.TextColor3 = Color3.fromRGB(255,0,0)
wait(0.5)
script.Parent.TextColor3 = Color3.fromRGB(255,255,255)
wait(0.5)
end
else
script.Parent.TextColor3 = Color3.fromRGB(255,255,255)
end
end