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

How would I save things that are not in leaderboards?

Asked by 9 years ago

Okay, so basically I have something set-up so that if a player gains a technique, a string value would indicate that they have the technique so they can use said technique.

For example:

Player PlayerGui Backpack StringValue <-- Yes StringValue <-- No

When a player presses Q or E, they can use string value 1 but if they try to use the key for string value 2 they can't do it.

Now, the problem is, how would I save these said values without them having to be in a leaderboard? This would just clog it up and I intent to use the leaderboard for something other than saving values.

1 answer

Log in to vote
0
Answered by 9 years ago

All you need to do is create the variables which you need and make the parent the player.

This is an example.

game.Players.PlayerAdded:connect(function (plr)
    local b = Instance.new("IntValue", plr) --Don't make the parent the leaderboard, instead use the player.
    b.Name = "number"
end)

You can then leaderboard and the values will not show as long as the parent it the player

0
I see, so I just need to add the data persistence through that just as I would using leaderboards? InfraredChasm 35 — 9y
0
I *highly* suggest using DataStores, but yes that's how you would do it. It's the same as saving for a leaderboard.. just you save the values in the player rather than the leaderboard. Goulstem 8144 — 9y
Ad

Answer this question