local replicatedFirst = game:GetService(âReplicatedFirstâ)
local contentProvider = game:GetService(âContentProviderâ)
local tweenService = game:GetService(âTweenServiceâ)
local players = game:GetService(âPlayersâ)
local player = players.LocalPlayer
local playerGui = player:WaitForChild(âPlayerGuiâ)
local loadingScreen = script:WaitForChild(âLoadingscreenâ)
replicatedFirst: RemoveDefaultLoadingScreen()
local assets = game:GetDescendants()
local clonedLoadingScreen = loadingScreen:Clone()
clonedLoadingScreen.Parent = playerGui
print(game:GetDescendants())
for i = 1, #assets do
local asset = assets[i]
local percentage = math.round(i / #assets * 100)
contentProvider:PreloadAsync({asset})
clonedLoadingScreen.BackGround.Displayporcent.Text = percentage.. "%"
clonedLoadingScreen.BackGround.DisplayassetsLoaded.Text = "Loading Assets: "..i.."/"..#assets
if i% 5 == 0 then
task.wait()
end
if i == #assets then
task.wait(1)
end
end
My best guess would be to remove that print(game:GetDescendants()) line which you added before the loop. This prevents all the other code from running because this line itself takes time in getting all the descendants.
still not loading further i deleted it
the print(game:GetDescendants())
Uhh are you sure you changed the name to âLoadingScreenâ in the WaitForChild line?
i changed and now i donât got any loadingscreen anymore
I recommend you should make it really simple: since the descandents are already loaded, this wonât be very effective. I recommend you just make a long tween with the loading bar.
i see what i do maybe i hire my scripter or pay him and he can add it thanks for helping guys
Yeah but fake loading screens are taboo and useless.
Nah you donât have to pay anyone to fix something like this. At that point theyâre basically scamming you.
Yea its probably because they use the same technique as just I said.
i alr have hired scripter but hes sleeping