Hello, I wanted to make a script that prints out one by one character of a full sentence. Below is shown my script, but I want it to repeat after it's done printing out the full text.
``` local Flux = script.Parent.NameValue.Value local Txt = ""
for i = 1,#Flux do Txt = Flux:sub(1,i) script.Parent.SurfaceGui.TextLabel.Text = Txt wait(0.001) end ```
Thanks!
Just put the loop in an infinite loop, like so:
lua
while true do
--// do stuff
end
I also do not recommend you call wait
with no arguments or an extremely small number. You never need to wait that short, use a higher number. If you do need to wait short intervals, take a look at RunService events.
Here is why not to wait for such a short amount of time.
I recommend 0.1
seconds, that is still pretty fast and reasonable.