Hello i am using a regular datastore script and whenever i force shutdown for updates there a few people whoos data is missing. Please help
i have it autosave and it comes up with a problem in the autosave here is the code: while true do wait(120) if can_Save.Value == true then local success,message=pcall(function() StrengthData:SetAsync((uniquekey), {strength.Value}) RebirthData:SetAsync((uniquekey), {rebirths.Value}) OtherData:SetAsync((uniquekey), {Egg.Value,FishingDuck.Value,ChillDuck.Value,Swimming.Value,Camo.Value,Wise.Value,Evil.Value,Stone.Value,Bush.Value,Behind.Value,King.Value,Kills.Value,KingC.Value,current_duck.Value})
end) if not success then print("not really found dude") wait(30) local success,message=pcall(function() StrengthData:SetAsync((uniquekey), {strength.Value}) RebirthData:SetAsync((uniquekey), {rebirths.Value}) OtherData:SetAsync((uniquekey), {Egg.Value,FishingDuck.Value,ChillDuck.Value,Swimming.Value,Camo.Value,Wise.Value,Evil.Value,Stone.Value,Bush.Value,Behind.Value,King.Value,Kills.Value,KingC.Value,current_duck.Value}) print("done") end) end end end