I'm really new at scripting, im just doing a project with my friends and we all are learning, but there is this guy who i know since a few weeks that said he know a bit more about this, so i seeked for help with him and gave me this. I want to modify or add something to the code, because its for a loading screen, and i want to add animations. The thing is, i want help because i dont understand how this works to edit it, can someone help?
Here is the script:
local LoadingText = "loading"
local textBox = script.Parent
local loadingScreen = textBox.Parent
for i = 1, #LoadingText do
textBox.Text = string.sub(LoadingText, 1, i)
task.wait(0.2)
end
local firstDotsCycleDone = false
while true do
for numDots = 0, 3 do
local dots = string.rep(".", numDots)
textBox.Text = LoadingText .. dots
task.wait(0.5)
if not firstDotsCycleDone and numDots == 3 then
loadingScreen.Visible = false
firstDotsCycleDone = true
end
end
end
** You are now Level 2! **