This "Asset Loader" is basically a timed loading screen. When I wrote the code for it I wasn't taking into account that everyone's computer and WiFi greatly differ so some players may load the game faster than others. I have 0 experience with asset loaders and I don't even know where to begin. I want the asset loader to actually wait for the assets to be loaded but I have no idea how to do this. Can someone help/point me in the right direction? Links to tutorials, wiki anything will help.
Code:
local time = 0
repeat
wait(0.35)
time = time + 1
script.Parent.Text = "Loading Assets: "..time.."%"
until time == 100
wait (2)
script.Parent.Text = "Loading Complete"
wait (4)
script.Parent.Transparency = .1
wait(0.1)
script.Parent.Transparency = .2
wait(0.1)
script.Parent.Transparency = .3
wait(0.1)
script.Parent.Transparency = .4
wait(0.1)
script.Parent.Transparency = .5
wait(0.1)
script.Parent.Transparency = .6
wait(0.1)
script.Parent.Transparency = .7
wait(0.1)
script.Parent.Transparency = .8
wait(0.1)
script.Parent.Transparency = .9
wait(0.1)
script.Parent.Transparency = 1
--[[
script.Parent.Parent.MainBox.Visible = true
wait (1)
script.Parent.Parent.MainBox.Blue:TweenSize(UDim2.new(1,0,1,0),"In","Linear", 1)
wait (1)
script.Parent.Parent.MainBox.Green:TweenSize(UDim2.new(1,0,1,0),"In","Linear", 1)
wait (1)
script.Parent.Parent.MainBox.Red:TweenSize(UDim2.new(1,0,-1,0),"In","Linear", 1)
wait (1)
script.Parent.Parent.MainBox.White:TweenSize(UDim2.new(-1,0,1,0),"In","Linear", 1)
wait (1)
script.Parent.Parent.MainBox.White.Visible = false
script.Parent.Parent.MainBox.Blue.Visible = false
script.Parent.Parent.MainBox.Green.Visible = false
script.Parent.Parent.MainBox.Red.Visible = false
wait (1) ]]
script.Parent.Parent.MainBox.Parent.BlackBar:TweenSize(UDim2.new(1,0,0.5,0),"In","Linear", 0.5)
script.Parent.Parent.MainBox.Parent.GrayBar:TweenSize(UDim2.new(-1,0,0.5,0),"In","Linear", 0.5)
wait (1)
script.Parent.Parent.MainBox.Parent.BlackBar:TweenSize(UDim2.new(-1,0,0.5,0),"In","Linear", 0.5)
script.Parent.Parent.MainBox.Parent.GrayBar:TweenSize(UDim2.new(1,0,0.5,0),"In","Linear", 0.5)
script.Parent.Parent.BackgroundTransparency = 1
script.Parent.Parent.MainBox.Visible = false
wait(0.5)
script.Parent.Parent.MainBox.Visible = false
script.Parent.Parent.Visible = false

3 comments
Is there a way I could just load the objects in workspace?
Yes, put the model into ServerStorage then use a for i loop to put it into workspace
Thank you