Hello, so I’m trying to learn how to use DataStore2 since I haven’t really bothered much with data stores and was wondering how does one loads a set of values into a folder which has values inside of it.

When a player leaves, it takes all the values and saves them which I got that part done. The hard part is being able to load them again.
local ServerScriptService = game:GetService("ServerScriptService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local Players = game:GetService("Players")
local Modules = ServerScriptService:FindFirstChild("Modules")
local DataStore2 = require(Modules:FindFirstChild("DataStore2"))
local PlayerData = ServerStorage:FindFirstChild("PlayerData")
Players.PlayerAdded:Connect(function(Player)
if PlayerData:FindFirstChild(Player.Name) then
PlayerData:FindFirstChild(Player.Name):Destroy()
end
local Folder = script.PlayerInformation:Clone()
Folder.Parent = PlayerData
Folder.Name = Player.Name
local InfoDataStore = DataStore2("Values", Player)
-- This is where I don't how to get the data and load it.
end)
Players.PlayerRemoving:Connect(function(Player)
local InfoDataStore = DataStore2("Values", Player)
local Folder = PlayerData:FindFirstChild(Player.Name)
local Values = {}
for _, Value in ipairs(Folder:GetChildren()) do
table.insert(Values, Value.Value)
end
InfoDataStore:Set(Values)
end)
If someone could help point me in the right direction I’d appreciate it, thanks!