There is no need for this. It is less complicated if you simply do it on the client.
Please make sure your LocalScript
(not a regular Script
) is parented to ReplicatedFirst. Then, parent your loading screen to your local script (make sure your loading screen GUI is named StarterScreen
).
This is the code you will want to put into your LocalScript
:
local cp = game:GetService("ContentProvider")
script.Parent:RemoveDefaultLoadingScreen()
local GUI = script.StarterScreen
GUI.Enabled = true
GUI.Parent = game.Players.LocalPlayer.PlayerGui
cp:PreloadAsync({workspace:GetChildren()})
GUI.Background.Counter.Text = "Assets Loaded."
task.wait(3) -- adjust this to how long you want the loading screen to stay
GUI:Destroy()