Why wont the background work, I am trying to make a loading screen that fills the background, this achieves by having the logo a bit transparent and the background not transparent. Then a textlabel with the color you want the logo to be filled in with would grow using Udim2 , but I can’t figure out what is the issue with this script, it wont work.
local prog = 0
while wait() do
prog = prog + 0.5
script.Parent.Size = UDim2.new(prog)
while wait() do
prog = prog*2
end
if prog == 50 then
wait(1)
script.Parent.Parent:Destroy()
end
end
local x = 0;
local div = 1000;--each division between a movement.
local transp = --thing you want to make transparent
for i = 1, div do
wait(1/div);
script.Parent.Size = UDim2.new(div/1000,0,1,0);--the entire screen of height.
transp.Transparency = div/1000;
end
game.Debris:AddItem(script.Parent,0)
I’d say it would be better if you’d utilise this into a proper loading screen.
You can use the ContentProvider service and use .RequestQueueSize to see what assets have to load.
Somewhere at the top of the script you’d want to set the initial queue size it has to load and use that as a foundation to use your load screen.
local TotalAmountofAssets = game:GetService("ContentProvider").RequestQueueSize
This would return an int value of the amount of assets which need to be loaded.
You can have a loop which keeps getting the amount of assets left needed to load and divide it by the total amount of assets:
local Progress = ContentProvider.RequestQueueSize/TotalAmountofAssets
This would be a number between 0 and 1 so you can use it in your loading UI:
The GuiObject Tween properties are terrible and legacy. TweenService should be used in place of GuiObject Tween methods, since TweenService can do everything those methods can and more.