Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need to make a DataStore. Can you please copy and paste the full script? [closed]

Asked by 4 years ago

Please, help! I need to make a DataStore for this:

-- Creates a leaderboard that shows player variables
    local function onPlayerJoin(player)
        local leaderstats = Instance.new("Folder")
        leaderstats.Name = "leaderstats"
        leaderstats.Parent = player

        local gold = Instance.new("IntValue")
        gold.Name = "Gold"
        gold.Value = 0
        gold.Parent = leaderstats

        local items= Instance.new("IntValue")
        items.Name = "Molecules"
        items.Value = 0
        items.Parent = leaderstats

        local spaces = Instance.new("IntValue")
        spaces.Name = "Spaces"
        spaces.Value = 2
        spaces.Parent = leaderstats

    end

Closed as Not Constructive by youtubemasterWOW

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by
DesertusX 435 Moderation Voter
4 years ago

This isn't a request site. Instead of giving you the whole script, I will send you the link to a tutorial by AlvinBlox here.

He explains it very well and I hope it helps you.

Ad
Log in to vote
0
Answered by 4 years ago

The whole script is literally everywhere for Datastore . I usually go to the official https://developer.roblox.com/en-us/articles/Saving-Player-Data