Roblox data not fully loadded and how to make script wait till your data fully load?

roblox data not fully loadded and how to make script wait till your data fully load?
script v

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
repeat wait(2)
until player.Stats or player:WaitForChild(“Stats”)
test = player.Stats:WaitForChild(“HC”)
print(test.Value)
if test.Value == true then
print(test.Value)
print(“CHARACTER ALREADY MADE”)
menu = game.ServerStorage.MENU:Clone()
menu.Parent = player.PlayerGui
menu.LocalScript.Enabled = true
elseif test.Value == false then
print(test.Value)
print(“CHARACTER NOT MADE”)
cc = game.ServerStorage.CC:Clone()
cc.Parent = player.PlayerGui
cc.LocalScript.Enabled = true

	end
end)

end)

my data HC is true but everytime i join the game keep saying that my HC is false but my HC is true
So i think it’s about loading this script how do i fix it?
(SORRY IM NOT VERY WELL WITH ENGLISH AND THANKS)

I had this problem too but I moved my game setup to a different script and then at the end of my data loading script I fired a bindable event and that starts the setup of the rest of my game. Maybe you could try that? (There might be a better way because I’m still kind of new)

Im not sure how it work like the most game did