local PlayerJoined_DataStore =
game:GetService('DataStoreService'):GetDataStore('JoinedTimes')
game.Players.PlayerAdded:connect(function(Player)
local Joined =
PlayerJoined_DataStore:GetAsync(tostring(Player.UserId))
local Stats = Instance.new('Folder',Player)
Stats.Name = 'leaderstats'
local JoinStat = Instance.new('NumberValue',Stats)
JoinStat.Name = 'Joined'
if Joined ~= nil or Joined == 0 then
JoinStat.Value = Joined
print("Loaded stats for "..Player.Name)
PlayerJoined_DataStore:SetAsync(tostring(Player.UserId), Joined + 1)
--[[ I would like to GetAsync data for the player kill value.
I have already made a leaderboard script with the value I want to save,
the directory of the value I want to save is game.Players.PLRNAME.leaderstats.Kills.Value
--]]
else
PlayerJoined_DataStore:SetAsync(tonumber(Player.UserId), 1)
warn("Failed to load stats for"..Player.Name)
end
end)
Ignore the "local VALUE =" with an empty definition of the line, look below the line to see what I defined the VALUE to be.

6 comments
I will attempt this method, thanks for the submission!
My goal of my comment was to GetAsync, if I were to SetAsync in a different line (such as PlayerRemoved), then can I change the "SetAsync" for the loading portion to "GetAsync"?
Not sure I follow. Send me a message @BlueGrovyle#5735 on Discord.
Method does not work, thanks for the effort.
I solved the issue myself, thanks for your time!
No problem!