game.Players.PlayerRemoving:Connect(function(player) player.CharacterRemoving:Connect(function(character) for i, v in pairs(character:GetChildren()) do if v:IsA("BoolValue") then if game.ReplicatedStorage:FindFirstChild(v.Name) then local UserId = "Player_"..player.UserId..v.Name local data = { Money = player.Money.Value; Kunai = player.Kunai.Value; } local success, errormessage = pcall(function() GameData:SetAsync(UserId, data) end) if success then print("Data Saved Succesfully") else print("Data Did Not Save Correctly") warn(errormessage) end end end end end) end)
Try making data into a dictionary rather than an array. I don't think you can save arrays.
Is this already answered? You can't save tables. Look at my answer here: https://scriptinghelpers.org/questions/123765/why-isnt-this-data-store-saving-the-pcall-says-it-is-working