I know most people said to use strings, but since I don't understand how to use them in datastore, I improvised. this is the result.
local DataStore = game:GetService("DataStoreService"):GetDataStore("InventorySkillsEtc")
game.Players.PlayerAdded:connect(function(player)
local Folder = Instance.new("Folder",player)
Folder.Name = "Values"
end)
game.Players.PlayerRemoving:connect(function(player)
local key = 'player'..player.UserId
local Children = player.Values:Getchildren()
DataStore:SetAsync(key, Children)
end)
My current error is GetChildren is not a valid member of Folder.
Any help regarding this script or how to put strings into a Datastore script would be greatly appreciated And you'll get a non-existent cookie made from the very fabric of Nonexistent universes.

3 comments
Try putting your folder somewhere else, such as ReplicatedStorage, though you might want to create a folder with the same name as the player and store your folder in that folder.
How do I reference it though?
I'm not sure if the parent of folder has anything to do with it but you might try using the player's gui as the storage for that folder. I've not messed around much with datastore so I can't provide much insight here.