Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Is there a way I can loop this scrolling text script?

Asked by 6 years ago
Edited 6 years ago

I want to create this for one of my upcoming games, but I am currently at a halt since I need this to further develop. The local fulltext is the text that prints in game, but that isn't necessary I need the part that loops the scrolling process repeatedly with no end

local fulltext = "Please stay off the platform" -- change to the text you want
local text = ""

for i = 1,#fulltext do
 text = fulltext:sub(1,i)
 script.Parent.Text = text
 wait()
end
0
while true do User#19524 175 — 6y
0
where do I put that? mb, im new to scripting e.e FriendBandsX 14 — 6y

1 answer

Log in to vote
0
Answered by
zblox164 531 Moderation Voter
6 years ago

Wrap you code up in a while loop. That will run the code inside of the loop forever. Make sure you put a wait in the loop because if you don't it will error. Here is the wiki page on loops: https://www.robloxdev.com/articles/Roblox-Coding-Basics-Loops

Example:

while true do
    -- your code here

    wait(0.01)
end
Ad

Answer this question