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)