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

Can i store tools in data?

Asked by 8 years ago

I need an example on how to store things that the players bought and it saves them.Should i do boolvalues? so when the player joins it loads the tool and gives it to them if its set to true. or what?

1 answer

Log in to vote
0
Answered by 8 years ago

I am just getting in the swing of data stores but you can save bool values for the tools and then check for them when they enter the game. Here are some helpful links: DataStores , PlayerAdded, and PlayerRemoving

When a player enters a game, load there stats from a data store and check for bools that they have. If the bools are true, put the corresponding tool in their StarterPack and there BackPack with an 'if' statement.

I mean, you can use Data Persistence which can save the tools directly but it is old, bulky, and depreciated. The only reason they haven't got rid of Data Persistence as to not brake the older games.

Ad

Answer this question