'How can I make scrolling text?

I am currently trying to make scrolling text. I’m using Lua 5.2.

The basic idea is: I have a variable with a long string of text in it

I want to make a function that takes the 1st variable, scrolls it (like the scrolling text thing you see at a train station or on the news) and then takes the scrolled text and puts it into a 2nd constantly updating variable.

How could I go about doing this?

Thanks

lua


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source