Hello I'm trying to make a loading gui but when the frame has reached (1.0, 0, 1, 0) it doesn't stop and i can't fint out how to fix it please help me here is the script
local prog = script.Parent
local gui = script.Parent.Parent.Parent.Parent.Parent
local frame = script.Parent.Parent.Parent.Parent
local lbarback = frame.LoadingBarBackground
local text = lbarback.Text
local textscript = lbarback.Text.Script
wait(0.8)
repeat
prog.Size = prog.Size + UDim2.new(0.01, 0, 0, 0)
wait(0.10)
until prog.Size == UDim2.new(1.0, 0, 1, 0)
while true do
if prog.Size == UDim2.new(1.0, 0, 1, 0) then
textscript.Disabled = true
text.Text = "Loaded!!"
wait(1.5)
gui:Destroy()
end
wait(0.01)
end
Here is a picture Link

4 comments
Thanks it works perfectly :)
No problem. Glad I could help!
'local' confines a variable to its specific scope. If it's defined in the global scope, as it is in this case, then all other scopes can access it because they're all under the global scope. It's also better to use local variables, even at the top of your code, for they increase efficiency and readability.
Then how do i make it change color i can't get that to work ??