#Leaderstats save......
23 messages · Page 1 of 1 (latest)
well i think i did freaking 100 times
can i see?
see what, i deleted the scripts that wasn't working
nah
so you wanna see how to save leaderstats and learn them?
ik how to do leaderstats
idk how to save them
for every player
i have one wait ill send u dm
yeah
im opening studio rn...
local getstore = datastore:GetDataStore("anything")
game.Players.PlayerAdded:Connect(function(added)
local userid = added.UserId
local stats = Instance.new("Folder",added)
stats.Name = "leaderstats"
local points = Instance.new("IntValue",stats)
points.Name = "Points"
local asyncValue = getstore:GetAsync(userid)
points.Value = asyncValue or 0
game.Players.PlayerRemoving:Connect(function()
getstore:SetAsync(userid,points.Value)
print("saved data into",points.Value)
end)
end)
doesn't work
** You are now Level 1! **