Ello, I am simply making a UI for a game I am working on and how would I make it so all the messages repeat themselves so it doesn’t stop at the last message?
local textLabel = script.Parent.message
wait(1)
local function typewrite(object,text,length)
for i = 1,#text,1 do
object.Text = string.sub(text,1,i)
wait(length)
end
end
typewrite(textLabel,"Welcome to the Canadian Army's Official Academy!",0.02)
wait(5)
typewrite(textLabel,"Buy gamepasses to support future development!",0.05)
wait(5)
typewrite(textLabel,"CoconutError is the Chief of Defence.",0.08)
wait(5)
typewrite(textLabel,"Report bugs in the bug reports channel of our dizzy!",0.11)
while true do
typewrite(textLabel,"Welcome to the Canadian Army's Official
Academy!",0.02)
wait(5)
typewrite(textLabel,"Buy gamepasses to support future
development!",0.05)
wait(5)
typewrite(textLabel,"CoconutError is the Chief of Defence.",0.08)
wait(5)
typewrite(textLabel,"Report bugs in the bug reports channel of our
dizzy!",0.11)
wait(5)
end
Thanks! Also while your online, why does the 3rd one slow down so much? Also updated script below.
local textLabel = script.Parent.message
wait(1)
local function typewrite(object,text,length)
for i = 1,#text,1 do
object.Text = string.sub(text,1,i)
wait(length)
end
end
while true do
typewrite(textLabel,"Welcome to the Canadian Army's Official Academy!",0.05)
wait(5)
typewrite(textLabel,"Buy gamepasses to support future development!",0.03)
wait(5)
typewrite(textLabel,"Report bugs in the bug reports channel of our dizzy!",0.5)
wait(5)
typewrite(textLabel,"Wanna raid? Check out the store to purchase weapons!",0.3)
wait(5)
typewrite(textLabel,"Don't wanna do training? Check the store to purchase ranks!",0.5)
end
Also, you should definitely be using task.wait(duration) over wait(duration) since it’s more accurate with the timing; task.wait counts by every heartbeat whereas regular wait counts by every 2nd heartbeat