For basics use datastores.
Http service can encode tables to JSON.
local http = game:GetService("HttpService")
local datastore = game:GetService("DataStoreService"):GetDataStore("Stuff")
game.Players.PlayerRemoving:connect(function(player)
datastore:SetAsync(player.userId,http:JSONEncode(table))
end) |