#Leaderstats save......

23 messages · Page 1 of 1 (latest)

silk tulip
#

just watch tutorial properly

#

i can do it for you

#

takes longer because im busy

dense lantern
silk tulip
dense lantern
#

see what, i deleted the scripts that wasn't working

silk tulip
#

nah

dense lantern
#

what should i do with them

#

hm

silk tulip
#

so you wanna see how to save leaderstats and learn them?

dense lantern
#

ik how to do leaderstats

#

idk how to save them

#

for every player

#

i have one wait ill send u dm

silk tulip
#

wait and takes longer

dense lantern
#

well, if u have one that COULDA WORK

#

sr caps

silk tulip
#

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)
dense lantern
#

doesn't work

inland shellBOT
#

studio** You are now Level 1! **studio