Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I add another text line? I added text3 but I cant see it when I go in the game..

local text = " Welcome To True Or False?"
local text2 = "By Zequew"
local text3 = "Make sure to give the place a thumbs up! And a favorite! :)"
local player = script.Parent.Parent
local gui = script.Parent
local sound = Instance.new("Sound",gui)
sound.SoundId = "http://www.roblox.com/asset/?id=14863866"
sound.Pitch = 1
sound.Volume = 0.8
local frame = gui.Frame
local text1 = frame.TextLabel
wait(1)
for i = 1,string.len(text),1 do
sound:play()
text1.Text = string.sub(text,1,i)
wait(0.1)
end
wait(2)
text1.Text = ""
for i = 1,string.len(text2),1 do
sound:play()
text1.Text = string.sub(text2,1,i)
wait(0.1)
end


coroutine.resume(coroutine.create(function()
for i = 0,20,0.01 do
text1.Position = UDim2.new(0,0,i,0)
wait()
end
end))
for i = 1,50,1 do
text1.TextTransparency = text1.TextTransparency + 0.02
wait(0.02)
end
gui:remove()

How would I be able to add more lines?

1 answer

You never used the text3 variable after assigning it, giving it nothing to do. Looking at the script, I see there's a bit of a 'template' there, created by the person who made it. Following it, I came up with this:

local text = " Welcome To True Or False?"
local text2 = "By Zequew"
local text3 = "Make sure to give the place a thumbs up! And a favorite! :)"
local player = script.Parent.Parent
local gui = script.Parent
local sound = Instance.new("Sound",gui)
sound.SoundId = "http://www.roblox.com/asset/?id=14863866"
sound.Pitch = 1
sound.Volume = 0.8
local frame = gui.Frame
local text1 = frame.TextLabel
wait(1)
for i = 1,string.len(text),1 do
sound:play()
text1.Text = string.sub(text,1,i)
wait(0.1)
end
wait(2)
text1.Text = ""
for i = 1,string.len(text2),1 do
sound:play()
text1.Text = string.sub(text2,1,i)
wait(0.1)
end
wait(2)
text1.Text = ""
for i = 1,string.len(text3),1 do
sound:play()
text1.Text = string.sub(text3,1,i)
wait(0.1)
end

coroutine.resume(coroutine.create(function()
for i = 0,20,0.01 do
text1.Position = UDim2.new(0,0,i,0)
wait()
end
end))
for i = 1,50,1 do
text1.TextTransparency = text1.TextTransparency + 0.02
wait(0.02)
end
gui:remove()

This discussion is preserved as it was. New answers, comments, and votes are closed.