How so I make surface GUI text transition loop?
✓ ANSWER ACCEPTED
How do I make a surface GUI cycle between text?
2 answers
✓ Accepted answer
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
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.
