DataStore not saving? (Filtering Enabled)
01 | local DataStore = game:GetService( "DataStoreService" ) |
02 | local ds = DataStore:GetDataStore( "hellomynameijks45346345" ) |
04 | game.Players.PlayerAdded:connect( function (plr) |
06 | a = Instance.new( "Folder" , plr) |
08 | Vals = ds:GetAsync(plr.UserId) |
11 | for i, v in pairs (game.ReplicatedStorage.Values:GetChildren()) do |
13 | Found = game.ReplicatedStorage.Values:FindFirstChild(v.Name) |
22 | game.Players.PlayerRemoving:connect( function (plr) |
24 | for i, v in pairs (plr.leaderstats:GetChildren()) do |
28 | table.insert(Vals, v.Name) |
31 | ds:SetAsync(plr.UserId,Vals) |
I can't find the problem, when I leave the game, it prints the variable that was in my leaderstats. But when I then enter the game, the GetAsync return nil to Vals. Anyone know why?