Ad
Log in to vote
0

How do I make a surface GUI cycle between text?

Asked by 7 years ago

How so I make surface GUI text transition loop?

2 answers

Log in to vote
1
Answered by 7 years ago

If i understand you right do this:

Put a script in the TextBox/TextButton/TextLabel and put this in it

TextBox = script.Parent

while wait(1) do -- Change 1 to how long you want it to wait
TextBox.Text = "I like bacon" -- change to text you want
wait(1) -- How long you want it to wait before changing
TextBox.Text = "And i like Cheese"
wait(1)
TextBox.Text = "I also like Pizza"
-- and so on
end
Ad
Log in to vote
0
Answered by 7 years ago

You can use either starkiller523's method or mine. They will both work, however mine takes up much less lines:

while true do
    for_,v in pairs ({"Hello!", "I like trains", "It's Friday!", "Bye :c"})  do  -- Edit, add, and remove phrases between the {}'s as shown in the example
        script.Parent.Text = v
        wait(1)  -- Time between changes
    end
end

Yes, mine would be inside of the Textbox/Label/Button.

Answer this question