So I have a folder in replicated first I’m busy with making a package for the preload folder it contains a pre loading screen where the business logo activated with the game is displayed for 5 seconds depending on game I’d it will enable the loading screen and after that a fake load bar (all loading screens are fake) well when I try to clone the folder to the playergui it will be added but if the game is loaded it immediately being removed
local folder = script.Parent.Preload
local plr = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()
if not RunService:IsStudio() then
-- handle loading screen visibility
end
local preload = folder:Clone()
preload.Parent = plr.PlayerGui
If I manually disable enabled the script it works but it can’t in the actual game
When the game loads I think it sort of clears the cache of the player elements to create a fresh template to clone the elements in the starter folders. So maybe try cloning the folder only after the game loads with
local folder = script.Parent:WaitForChild("preload")
print(folder)
if not folder then
task.wait()
end
local player = game:GetService("Players").LocalPlayer
local RunService = game:GetService("RunService")
game:GetService('ReplicatedFirst'):RemoveDefaultLoadingScreen()
repeat task.wait() until game:IsLoaded()
if not RunService:IsStudio() then
-- enable loadingscreens will be based on game prob
end
if player then
local preload = folder:Clone()
preload.Parent = player.PlayerGui
print(preload.Parent)
end
``` somtimes and in studio it being removed from playergui inmidialtly