How do I make the size change for every loop?
for n = 0, 100 do
textbutton.Text = "Loading..."
frame.Size = loader.Size + UDim2.new(0,2,0,0)
wait(math.random(0.4,0.5))
end
How do I make the size change for every loop?
for n = 0, 100 do
textbutton.Text = "Loading..."
frame.Size = loader.Size + UDim2.new(0,2,0,0)
wait(math.random(0.4,0.5))
end
Here is a script from my game that increases the loading bar by 0.009 every loop. It makes it look like a slow moving loading bar.
p = script.Parent
il = script.Parent.ImageLabel
for i = 1, 100 do
il.Size = il.Size + UDim2.new(0.009,0,0)
p.Text = "Loading Tumble-Slides "..(i*1).." %"
wait(0.1)
end
Please upvote if it worked how you wanted it to :)
You can use TweenSize() and TweenPosition() to move a GUI fluidly:
frame:TweenSize(UDim2.new(0.5,0,0.5),Enum.EasingDirection.Out,
Enum.EasingStyle.Sine,0.5,true)
Learn more about TweenSize() and TweenPosition() here.
I tried but it doesn't work like I wan't it too. It needed to be + 2 every time it has waited. Also because I use math.random in my script.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Are you trying to make a loading bar for your game?
Yh. But don't know how to actually make it follow and wait to all assets are loaded. Can't find any tutorials and I think it's too complicated.
Please upvote if it worked how you wanted it to :)