#I need help with this Data sometimes not loading

1 messages · Page 1 of 1 (latest)

tiny magnet
#
local PS = game:GetService("Players")

local timeout = 3
local startTime = tick()
local Data

local GlovesNotToKeep = {
    "AdminGlove1"; 
}

PS.PlayerAdded:Connect(function(Player)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = Player

    local Kills = Instance.new("NumberValue")
    Kills.Name = "Kills"
    Kills.Parent = leaderstats

    local Glove = Instance.new("StringValue")
    Glove.Name = "Glove"
    Glove.Value = "Killstreak"
    Glove.Parent = leaderstats
    -------------------------------------------------------
    
    repeat
        Data = ProfileManager:Get(Player)
        if not Data then
            task.wait()
        end
    until Data or tick() - startTime > timeout```
#

I need help with solving this data issue, sometimes it load, sometimes they loses it.

fiery wren
#

if loosing Data is your issue then you would have to send the module because this script doesnt handle rly anything with the actual data