Editing a string

I want to have a “joining match…” text label with the 3 dots disappearing and reappearing like so

--[[
Joining Match
Joining Match.
Joining Match..
Joining Match...
Joining Match (repeats)
]]

How could I go about doing this? I’d prefer it if, like a tween, it didn’t yield.

Strings are immutable, so they cannot be edited.

You could use a for loop like this:

coroutine.wrap(function()
    while joining_match do
        for i = 1, 3 do
            label.Text = "Joining Match" .. string.rep(".", i)
            wait(0.1)
        end
    end
end)()
5 Likes