I made a loading assets Gui and when i play the other guis of the game appear with the Gui and it looks really bad, i wonder if there was a way that i could disable the other guis for 5 seconds or something like that, because i only want the loadingscreen for 5 seconds.
game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()
local cp = game:GetService("ContentProvider")
local optionalAssets = {}
local disabledServices = {
["Lightning"] = false;
} --services not to preload
local ui = script:WaitForChild("laodingUI")
ui.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
local blur = Instance.new("BlurEffect", game:GetService("Workspace").CurrentCamera)
--preloading
warn("starting preload")
local startTick = tick()
--preload the optional assets first
cp:PreloadAsync(optionalAssets)
--preload the entire game
for i,service in pairs(game:GetChildren())do
pcall(function()
if not disabledServices[service.Name] then
--warn("service not disabled")
cp:PreloadAsync((service))
end
end)
end
wait(10)
warn("preload done, time:"..string.sub(tick()-startTick,1 ,5).."s")
ui:Destroy()
blur:Destroy()

2 comments
set all of the guis visibility to false at the top and after the Destroy()'s set it to true. i wonder if theres an event that waits for the loading GUI though.
I answered the easier way to do it