I need to add both some text and a value into the same textlabel. So, I have a countdown and I want to make the text label say, "(number) seconds remaining!" Does anyone know how do this?
COMMUNITY QUESTION
Very simple problem, hopefully someone can help me with it?
2 answers
Try this
for count = 1, 100 do
wait(.1)
Value = Value + 1
Text = Value.. ' seconds remaining!'
end
Honestly, I'd say to make a text-changing function (But I'm pretty lazy xD) This is what I would do:
function updateText(message)
game.StarterGui.ScreenGui.TextLabel.Text = message -- Make sure that the location is correct
end
You could then use the function above to change text whenever
local timer = 30 -- Change number to however many seconds you want
while timer > 0 do
updateText(timer.. " seconds remaining!")
wait(1)
timer = timer - 1
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Hope that helps!