Loading Screen and other GUIS

I have a loading screen script in ReplicatedFirst
While loading in the other GUI’s stay there and i tried making them invisible but i cant

I have tried enabling the DefaultUI but ive realized that the script has to be a child, ive tried remote events but it kept doing the loading screen when the user dies and respawns. ive also tried making it visible after some time with a local script but it also kept happening after you respawn when dying

This is the script iu have

local player = game:GetService("Players")
local RF = game:GetService("ReplicatedFirst")
local ContentP = game:GetService("ContentProvider")
local TS = game:GetService("TweenService")
local SG = game:GetService("StarterGui")
local DU = SG:WaitForChild("DefaultUI")

RF:RemoveDefaultLoadingScreen()


local plr = player.LocalPlayer
local plrGUI = plr:WaitForChild("PlayerGui")

local LoadingScreen = script:WaitForChild("LoadingScreen"):Clone()
LoadingScreen.Parent = plrGUI

local frame = LoadingScreen:WaitForChild("Frame")
local Text = frame:WaitForChild("TextLabel")
local bar = frame:WaitForChild("LoadingBar"):WaitForChild("Bar")
wait(2)
local assets = game:GetChildren()
wait(2)

for index, asset in pairs(assets) do 
	wait()
	Text.Text = "Loading\n " .. asset.Name .. "..."
	ContentP:PreloadAsync({asset})
	local progress = index / #assets
	bar.Size = UDim2.new (progress, 0, 1, 0)
end
wait()
Text.Text = "Loading Complete"
bar.Size = UDim2.new (1, 0, 1, 0)
if bar.Size == UDim2.new (1, 0, 1, 0) then
end

task.wait(2)
LoadingScreen:Destroy()

If you have a solution for it please tell me, thank you.

put the script in replicated first

it is already in Replicated First

They already did that.

Try LoadingScreen.Visible = false.

the problem isnt the loading screen it goes away great im just talking about thr Defaukt UI in ScreenGui is not going away when the loading screen is up, ive tried to change the zindex

I have a game that removes all the other ui in the main menu. all you gotta do is make a folder in replicated storage, put all the ui in there that you dont want to show up on the loading screen, turn off reset on spawn (or whatever it’s called), then when the loading screen is done use a for loop to clone all of the ui into the player’s ui folder

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.