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

How would I save things that are not in leaderboards?

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

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

2 comments

0

I see, so I just need to add the data persistence through that just as I would using leaderboards?

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.

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