Here is my question: How do I create a DataSaving script for an IntergerValue's Value that has nothing to do with a player?
Data saving is new to me, so I'm lost. I tried to mess with a leaderboard DataSaving script to make it work for just the IntValue, but it didn't turn out right. I'll give you the full leaderboard save script that I used:
local datastore = game:GetService("DataStoreService"):GetDataStore("DataSave0")
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("IntValue")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local points = Instance.new("IntValue")
points.Name = "Points"
points.Parent = leaderstats
local wins = Instance.new("IntValue")
wins.Name = "Wins"
wins.Parent = leaderstats
local key = "user-" .. player.userId
local storeditems = datastore:GetAsync(key)
if storeditems then
points.Value = storeditems[1]
wins.Value = storeditems[2]
else
local items = {points.Value, wins.Value}
datastore:SetAsync(key, items)
end
end)
game.Players.PlayerRemoving:connect(function(player)
local items = {player.leaderstats.Points.Value, player.leaderstats.Wins.Value}
local key = "user-" .. player.userId
datastore:SetAsync(key, items)
end)
It should probably be fairly easy, but I am still lost.

2 comments
Not a bad try, I don't know if it will work lol, but have a look at my answer :P and if you want to save it in a table, do with getasync do or {} (you'll see what I mean, I already explained what to do with bools, that place)
Lol yeah Ill have a look