How do I add an animated ... in loading screens?

I know it’s kind of simple, but I want to make it so that the text says

"Loading".. value " in " .. countdownnum.. " seconds" 

in a for loop, but I also want to make the … not animate as fast as the other for loop.

I used coroutines, like

number.Text = number.Text.. "."
wait(1.5)
number.Text = number.Text.. ".."

but what that does is keep adding infinite periods. how do I do it the right way?

Could do it in a few ways but the easiest way would probably be a generic for loop that repeatedly changes the number of periods until the game has loaded or whatever your condition is.

while not hasLoaded do
    for i = 1, 3 do -- you could change it to be any number but 3 is probably the best
        label.Text = 'Loading' .. string.rep('.', i)
        task.wait(0.5)
    end
end
1 Like

Use MaxVisibleGraphemes then do this

for i = 1, 3 do
	script.Parent.MaxVisibleGraphemes = (#script.Parent.Text - 3) + i
	task.wait(1)
end