DataStore script help

I’ve finished the module completely, but there is one thing, getting the data, I have NO idea how to do this. (help)
Review the script I guess, (skip to getData at the bottom if you want)

local DSSfunc = {}
local DSS = game:GetService("DataStoreService")
local LogService = game:GetService("LogService")
local Players = game.Players

function DSSfunc:CreateDataStore(Name)
	DSS:GetDataStore(Name)
end

function DSSfunc:AddFolder(InstanceName)
	local NewFolder = Instance.new("Folder")
	NewFolder.Name = InstanceName
	NewFolder.Parent = game.ReplicatedStorage
end

function DSSfunc:AddValue(InstanceType, InstanceName, FolderName)
	if InstanceType == "BoolValue" then
		local BoolValue = Instance.new("BoolValue")
		BoolValue.Parent = game.ReplicatedStorage:WaitForChild(FolderName)
		BoolValue.Name = InstanceName
	elseif InstanceType == "StringValue" then
		local StringValue = Instance.new("StringValue")
		StringValue.Parent = game.ReplicatedStorage:WaitForChild(FolderName)
		StringValue.Name = InstanceName
	elseif InstanceType == "NumberValue" then
		local NumberValue = Instance.new("NumberValue")
		NumberValue.Parent = game.ReplicatedStorage:WaitForChild(FolderName)
		NumberValue.Name = InstanceName
	end
end

function DSSfunc:SaveData(PlayerInstance, FolderToSave, cDataName)
	local success, errormsg = pcall(function()
		local Store = DSS:GetDataStore(cDataName)
		local TableToSave = {}
		for _,data in pairs(FolderToSave:GetChildren()) do
			table.insert(TableToSave, data.Value)
		end
		Store:SetAsync(PlayerInstance, TableToSave)
	end)
	if success then
		print("Data saved successfully!")
	else
		print("Oof! Data was not able to save!")
		warn(errormsg)
	end
end

function DSSfunc:GetData(PlayerInstance, FolderToGet, cDataName)
	local data
	local success, errormsg = pcall(function()
		local Store = DSS:GetDataStore(cDataName)
		data = Store:GetAsync(PlayerInstance)
		local TableToGet = {}
		for _,data1 in pairs(FolderToGet:GetChildren()) do
			table.insert(TableToGet, data1.Value)
		end
	end)
	if success and data then
		print("Data retrieved successfully")
		-- this part is annoying
	else
		print("Player has no data")
	end
end

return DSSfunc

You need to pass a string or a number value (which gets converted into a string) to the :GetAsync method - for this, the player’s userid is common practice. When you pass PlayerInstance you in reality pass a reference/path to the player instance.

Read the API for more information and examples.

Data Stores
GetAsync

I know, I have instructions to go with it, the PlayerInstance argument should be the player with the UserId; Player.UserId

Here’s the run script:

local CanaryData = require(script.CanaryData)

game.Players.PlayerAdded:Connect(function(Player)
	
	CanaryData:CreateDataStore("Ca")
	CanaryData:AddFolder("YourMom")
	CanaryData:AddValue("BoolValue", "yessirbool", "YourMom")
	CanaryData:GetData(Player.UserId, game.ReplicatedStorage:WaitForChild("YourMom"), "Ca")
	
end)

game.Players.PlayerRemoving:Connect(function(Player)
	
	CanaryData:SaveData(Player.UserId, game.ReplicatedStorage:WaitForChild("YourMom"), "Ca")
	
end)

The script does not error, so I am not sure if the data is not saving, or theres a problem with getting it