Hey developers!
I’m trying to make a text show the number of the length on a string.
For example you have 300 characters to type in a textBox and as you type the number goes down.
I’ve tried to do this
local text1 = script.Parent.Text -- This is the text box text
local text2 = script.Parent.Parent.TextLabel.Text -- This is the "300" text
while true do
local counter = string.len(text1)
text2 = 300 - counter
wait(0.1)
end
This is a local script but it didn’t work.
I don’t know how to make this work as I’m kinda new to string stuff so any help would be appreciated!
Bonus Help?
And if possible to make the color of the text change based on the text length, starting color would be white, and then yellow and then red when it reaches a low number
Thanks in advance!