You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
have “zombies left” green and the text number of zombies red
local round = game.ReplicatedStorage.Values.zombiesAlive
local rnd = script.Parent.round
function Update ()
if round.Value == 0 then
rnd.Text = "N O Z O M B I E S L E F T"
else
rnd.Text = "Z O M B I E S L E F T "..round.Value
end
end
Update()
round.Changed:Connect(function()
Update()
end)
I tried
rnd.Text = 'Z O M B I E S L E F T <mark><font color="rgb(255,0,0)"'..round.Value
but this did not work
Is there an article or reference on how to change the color of text?
I know there’s probably a more complex but faster way to do this but normally I just create 2 text labels for 2 different colours and change them accordingly
So i looked through the article, the issue is the text i want to change is a value so when im adding in the “” it breaks or does not change the color of the value text… is there a work around for this?
local round = game.ReplicatedStorage.Values.zombiesAlive
local rnd = script.Parent.round
function Update ()
if round.Value == 0 then
rnd.Text = "N O Z O M B I E S L E F T"
rnd.TextColor = Color3.fromRGB(0, 255, 0)
else
rnd.Text = "Z O M B I E S L E F T "..tostring(round.Value)
rnd.TextColor = Color3.fromRGB(255, 0, 0)
end
end
Update()
round.Changed:Connect(function()
Update()
end)