Hello, I'm making a GUI who's making a loading bar. Part > SurfaceGUI > Percentage ( TextLabel) ; Background (TextBox)
SurfaceGui = script.Parent Percentage = SurfaceGui.Percentage a = 0 while true do a = a + 12 Percentage.Size = UDim2.new(0, a, 0.1, 0) wait (0.1) if a == 1200 then break end end
Is there a way to optimise this script or is it good ? Thanks
I would use scale rather than offset, that way you can resize your GUI without worrying about going in this script and changing the offset so that the loading bar fills up the entire frame. Just a side note, fake loading bars are the worst so I really hope you're actually loading something.