✓ Accepted answer
Here ya go, you can put as many lines as you want:
local Texts = {
"Loading some rare pets...",
"Loading home base...",
"Loading the pet hospital...",
"Loading pet eggs...",
"Loading some other stuff...",
"Loading you...",
"Loading the part you will spawn on...",
"And the list goes on...",
}
local TimeToSwitch = 0.1
while true do
local ChooseText = math.random(1,#Texts)
script.Parent.Text = Texts[ChooseText]
wait(TimeToSwitch)
end
EDIT Op and I talked in chat, he wanted to add an effect. This is how you can do so:
local AmountOfPeriods = 3
local TimeToSwitch = 1
local Texts = {
"Loading some rare pets...",
"Loading home base...",
"Loading the pet hospital...",
"Loading pet eggs...",
"Loading some other stuff...",
"Loading you...",
"Loading the part you will spawn on...",
"And the list goes on...",
}
while true do
local ChooseText = math.random(1,#Texts)
local selectedText = Texts[ChooseText]
local Num = #selectedText - AmountOfPeriods + 1
for i = 1, AmountOfPeriods do
script.Parent.Text = string.sub(selectedText, 1, Num)
Num = Num + 1
wait(0.5)
end
wait(TimeToSwitch)
end
1 comment
this is way better than my answer good job man