What do you want to achieve?
I would like to wait for the shadows to load in before the player can see anything.
What is the issue?
The shadows load in later on (skip to 0:25) Bug Video - YouTube
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Ive tried adding a wait, looking on google(dev forum, docs, youtube)
local ReplicatedStorage = game:GetService('ReplicatedStorage') -- useless
local ReplicatedFirst = game:GetService('ReplicatedFirst') -- get replicatedfirst
local ContentProvider = game:GetService("ContentProvider") -- get contentprovider in this video it will help to load assets of the games
local Assets = game:GetDescendants() -- this get all the descendants of the game means all children of children etc.. so all assets.
local UI1 = script.LoadUI:Clone() -- it clone the GUI that is in the script so i can copy later for the loading
local Player = game.Players.LocalPlayer -- it get the local player the one playing
local PlayerGui = Player:WaitForChild("PlayerGui") -- it his GUI so i can put the loading in here
ReplicatedFirst:RemoveDefaultLoadingScreen() -- i forget to add this, it remove default loading of roblox
repeat task.wait() until game:IsLoaded() -- wait til loads because sometimes it makes mistakes.
UI1.Parent = PlayerGui -- it put the gui into playergui so he can see it
for i = 1, #Assets do -- from index 1 to the last asset number, it does
local asset = Assets[i] -- here is to get the current asset loading
ContentProvider:PreloadAsync({asset}) -- load the asset into the game
UI1.Frame.LoadTxt.Text = "Loading: "..asset.Name.." ["..i.."/"..#Assets.."]" -- show his name and the current progress
end
local plr = game.Players.LocalPlayer
UI1.Frame.LoadTxt.Text = "Finishing Last Touches..."
task.wait(4.5)
print("Finished Loading")
plr.PlayerGui.Menu.MainMenu.Visible = true
UI1.Frame.Visible = false