I have been trying to get it a typewriter effect to work that references random variables at the Table to deliver at the Text. Can anyone help me out?
local TextTable = {
[1] = "Testing",
[2] = "Yolo"
}
local function typewriter(object,text,length)
TweenService:Create(Text, TweenIn, {TextTransparency = 0}):Play()
for i = 1, #text, 1 do
object.Text = string.sub(text,1,i)
wait(length)
end
TweenService:Create(Text, TweenIn, {TextTransparency = 1}):Play()
end
while true do
typewriter(Text, math.random(#TextTable), 0.02)
end return
local TextTable = {
[1] = "Testing",
[2] = "Yolo"
}
local function typewriter(object,text,length)
TweenService:Create(Text, TweenIn, {TextTransparency = 0}):Play()
for i = 1, #text, 1 do
object.Text = string.sub(text,1,i)
wait(length)
end
TweenService:Create(Text, TweenIn, {TextTransparency = 1}):Play()
end
while true do
typewriter(Text, TextTable[math.random(1, #TextTable)], 0.02)
end return
local TextTable = {
[1] = "Testing",
[2] = "Yolo"
}
local function typewriter(object,text,length)
TweenService:Create(Text, TweenIn, {TextTransparency = 0}):Play()
for i = 1, #text, 1 do
object.Text = string.sub(text,1,i)
task.wait(length)
end
TweenService:Create(Text, TweenIn, {TextTransparency = 1}):Play()
task.wait(1.5)
end
while true do
typewriter(Text, TextTable[math.random(1, #TextTable)], 0.02)
end return