Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make this scrolling text repeat when it's done printing out?

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

script's parent group

Thanks!

2 comments

0

Make a repeat loop...?

0

Yes, I don't know how to make one.

1 answer

✓ Accepted answer

Just put the loop in an infinite loop, like so:

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.

1 comment

0

Thank you! I don't know why I haven't thoght of it.

This discussion is preserved as it was. New answers, comments, and votes are closed.