✓ Accepted answer
You can use a for loop, for example:
local function WriteLine(text)
print(text)
end
for i = 0,5,1 do
WriteLine(i..". This is the text that will be printed.")
wait(1)
end
Another example:
local function WriteLine(Start, End, Increment, Time, Text)
for i = Start, End, Increment do
print(Text)
wait(Time)
end
end
WriteLine(0, 5, 1, 1, 'Text that will be printed.')
A for loop is useful for having a loop run for the number of times you set it to. In this for loop I set it to start at 0 and end at 5 by incrementing by 1 every 1 second. You can see more information about for loops here.
1 comment
Thanks! It worked.