Alright, after a lot of time and hard work I got how to do a decent load / save data script. 1st Try.
local DataStore = game:GetService("DataStoreService"):GetDataStore("StoreName")
game.Players.PlayerAdded:connect(function(player)
local key = "key-"..player.userId
local points = game.ReplicatedStorage.AvailablePoints
local strength = game.ReplicatedStorage.Strength
local level = game.ReplicatedStorage.Level
local quirk = game.ReplicatedStorage.Quirk
local save = DataStore:GetAsync(key)
if save then
points.Value = save[1]
strength.Value = save[2]
level.Value = save[3]
quirk.Value = save[4]
else
local load = {points.Value, strength.Value, quirk.Value, level.Value}
DataStore:SetAsync(key,load)
end
end)
game.Players.PlayerRemoving:connect(function(player)
local key = "key-"..player.userId
local load = {game.ReplicatedStorage:FindFirstChild("AvailablePoints").Value, game.ReplicatedStorage:FindFirstChild("Quirk").Value, game.ReplicatedStorage:FindFirstChild("Level").Value, game.ReplicatedStorage:FindFirstChild("Strength").Value}
DataStore:SetAsync(key,load)
end)
And it actually worked! but, the real problem now is. It only loads me the points value, and not also strength, quirk and level. Can you find any error in here? I also tried to give myself more Points with a script and tried different times to give me points in Strength since only AvailablePoints loaded and not the others!
EDIT: This is the actual script that keeps not working.
local DataStore = game:GetService("DataStoreService")
local ST = DataStore:GetDataStore("StoreName")
game.Players.PlayerAdded:Connect(function(player)
local Backpack = player:WaitForChild("Backpack")
local points = Backpack.AvailablePoints
local strength = Backpack.Strength
local level = Backpack.Level
local quirk = Backpack.Quirk
points.Value = ST:GetAsync(player.UserId) or 1
strength.Value = ST:GetAsync(player.UserId) or 2
level.Value = ST:GetAsync(player.UserId) or 3
quirk.Value = ST:GetAsync(player.UserId) or 4
while wait(7) do
ST:SetAsync(player.UserId, points.Value, strength.Value, level.Value, quirk.Value)
print("works!")
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local Backpack = player:WaitForChild("Backpack")
ST:SetAsync(player.UserId, Backpack.AvailablePoints.Value, Backpack.Strength.Value, Backpack.Level.Value, Backpack.Quirk.Value)
print("works!")
end)

7 comments
UserId not userId. Connect not connect.
Still not working.
It may be because you're trying to load the first value of the saved table in your GetAsync for all of your values.
I tried, and it's not working, but that was an error too!
On lines 12-15, try changing the values to go accordingly 1,2,3,4. Let me know if that worked but I am a novice.
Still not working :c
All I can really suggest is an article on data stores: https://scriptinghelpers.org/guides/saving-and-loading-data-with-datastores