How do I make loading dot's repeat themselves (loop)

So, I made a system when you touch a part it teleport’s you to another Place.
That isn’t that important. But when you arrive in the place there is a script that removes the default LoadingScreen and then there is a Teleporting… But I cannot seem to find out how to make the dots appear and re-appear. I do not have a script for this. But I did find one on DevHub that makes a new GUI and says Loading…(the dot’s repeat themselves in this version but it doesn’t allow me to put it in my script) Thanks!

“I did find one on the DevHub”

while loadingGame do
textLabel.Text = "Loading " .. string.rep(".",count)
count = (count + 1)
wait(.3)
end

From the developer hub like you mentioned (don’t mind the indentation), what’s the issue with that?

(the dot’s repeat themselves in this version but it doesn’t allow me to put it in my script) Thanks!

This is a little unclear, do you mind explaining? ^

1 Like

Well, it makes it’s own loading gui. A normal font, grey backround and adds the moving dot’s. That is my issue with that one.

Just implement the code snippet I gave you above. You’ll have to edit it to your needs because:

  • loadingGame would have to be changed to fit your conditions (e.g. checking when game is loaded)
  • textLabel needs to be changed to your TextLabel’s name (or where variable is assigned)

Also, this is the same one I found. I also have some questions.

  1. Do I have to put this in my loading GUI if so is this the correct way to do it:
script.Parent:RemoveDefaultLoadingScreen()

local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")

PlayerGui:SetTopbarTransparency(0)

local GUI = script.LoadingScreen:Clone()

GUI.Parent = PlayerGui

wait(5)

GUI.Frame:TweenPosition(UDim2.new(0,0,1,0),"InOut","Sine",0.5)

wait(0.5)

GUI:Destory()

while loadingGame do

textLabel.Text = "Loading " .. string.rep(".",count)

count = (count + 1)

wait(.3)

end

If not where do I actually put it?
2. Do I have to change “Loading”,“loadingGame” to my Teleport text like so?:

while teleportGame do
Teleporting.Text = "Teleporting " .. string.rep(".",count)
count = (count + 1)
wait(.3)
end

That’s it.

Destroy* :wink:

  1. Yeah, you need to change textLabel to a textlabel that you’ve created within that UI though.

  2. Yeah that’s fine to change the text. When you do the while loop, I’m not sure that’ll work. You can have a set time to wait (bit strange but hey, whatever floats your boat) or loop until the game is loaded.

These may help with the conditions for the loop:

1 Like