function player_addition(Plyr) repeat wait() until Plyr.Character and Plyr.Character.Humanoid.Health >= 5 local A = Instance.new("BoolValue") A.Name = "Loading_01" A.Parent = Plyr.PlayerGui.L_Data A.Value = true Plyr.CharacterAdded:connect(function(Character) repeat wait() until Plyr.Character and Plyr.Character.Humanoid.Health >= 5 Plyr.PlayerGui:WaitForChild("L_Data") if Plyr.PlayerGui.L_Data.Loading_01.Value == true and Plyr.PlayerGui:FindFirstChild("Loading_Gui") == nil then game.ReplicatedStorage.Loading_Gui:clone().Parent = Plyr.PlayerGui <---Problem starts here. end Plyr.CharacterAdded:connect(function(Character_01) Character_01:WaitForChild("Humanoid").Died:connect(function() repeat wait() until Plyr.Character and Plyr.Character.Humanoid.Health >= 5 Plyr.PlayerGui:WaitForChild("L_Data") if Plyr.PlayerGui.L_Data.Loading_01.Value == true and Plyr.PlayerGui:FindFirstChild("Loading_Gui") == nil then game.ReplicatedStorage.Loading_Gui:clone().Parent = Plyr.PlayerGui end end) end) end) end game.Players.PlayerAdded:connect(player_addition)
I did my own tweaking a bit. You didn't need a second CharacterAdded event.
game.Players.PlayerAdded:connect(function(Plyr) repeat wait() until Plyr.Character and Plyr.Character.Humanoid.Health >= 5 local A = Instance.new("BoolValue") A.Name = "Loading_01" A.Parent = Plyr.PlayerGui.L_Data A.Value = true Plyr.CharacterAdded:connect(function(Character) repeat wait() until Plyr.Character and Plyr.Character.Humanoid.Health >= 5 Plyr.PlayerGui:WaitForChild("L_Data") if Plyr.PlayerGui.L_Data.Loading_01.Value == true and not Plyr.PlayerGui:FindFirstChild("Loading_Gui") then game.ReplicatedStorage.Loading_Gui:clone().Parent = Plyr.PlayerGui <---Problem starts here. end end) end)