Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I still don't understand data stores, can anyone help? [Unanswered]

I read the Wiki Article on Data Persistance, and Data Store. I don't understand them. I need help.

2 comments

0

The wiki article isnèt helping me.

0

I agree, the wiki can be very confusing at times. Unfortunately I do not know much about data stores.

3 answers

Data stores are basically where you can save small bits of information on a player such as a point value. They are commonly used for saving and loading leaderstats. I reccommend making a script that saves apon player exit. I hope I helped.

I found this from the wiki to help you. The first line says "If the player is leaving then" The second line says "If the person has a leaderstats then" The third line says "Save the number and where to find the number"

game.Players.PlayerRemoving:connect(function(player)
    if player:FindFirstChild("leaderstats") then
        player:SaveNumber(scoreKey, player.leaderstats.Score.Value)
    end
end)

3 comments

0

I know but I don't know how to make the script. I keep looking at the wiki scripts. I don't understand the, All this UpdateAsync() stuff

0

^I hope my updated version helps! Thumbs up and Check mark my answer!

This discussion is preserved as it was. New answers, comments, and votes are closed.