The title may sound a bit confusing but I'll make an example.
I'm using DataStore to save some player equipment, but to retreive some values they need to come in a string and numbers to avoid needing to create an addictional DataStore.
Let's say in the following script I get a string value with the value "Pills_5". "Pills" is the name of the item and the number is the number of the items the player has. I need to remove the "Pills_" and only leave the number so I can set that number as the anmount of "Pills" the player has. Here's a short version of a script of what I want to do:
--DataS is a table with the values which was retreived from the DataStore print(dataS.Pills) --Result: Pills_5, I need to remove the "Pills_" player.Items.Pills.Name = "Pills" player.Items.Pills.Value = dataS.Pills --Need to only show "5" and remove the "Pills_"
How would I do so? Is it possible to save a table such as:
local MyBoitifullTable = {Pills = 5,Medkit = 2}
and then retreive it?
Help is appreciated!