To convert a number to a string, you use the tostring(number) function. What this will do is attempt to convert the given number to a string, and then return that string. If no number is given, it returns nil.
tostring(50)
I'm not entirely sure what you're attempting to do. You have an if statement that affects the value of a NumberValue, but you're doing nothing to display the changing number to users.
On line 11, you set the text to whatever is was equal to at line 01, disregarding that C is no longer equal to script.Parent.C.Value(due to the for loop). If that's what you intend, it begs the question, why the loop?
We can make your loop more efficient, however, for you already have a variable (i) that is changing, so you can use that to directly set the value.
for i = 1, 2500 do
wait()
CV.Value = i
end
1 comment
What's the output