Just a question on which method would I use to save items bought in a shop? E.g there are 50 different weapons in a shop and when someone buys an item it allows you to equip and unequip, and will allow you to equip/unequip when you leave and join later. Would I have to make a whole table of all items and see if the player owns each one?
✓ ANSWER ACCEPTED
How to save items bought in a shop?
1 answer
✓ Accepted answer
I would use Data Store. Not writing a whole script though. I would put some sort of Value in the item (StringValue, IntValue). You don't need to save the item just save the value.
You will need to change the value when the player buys the item.
Example:
if item1.StringValue.Value == "Purchased" then
-- Move the item to the player
else
-- If the player does not own the item then return false
return false
end
Do that for each item and save the value in a table and it should be really easy.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Assuming you're using data stores, you could just save a table of all names of the tools that they have bought, then do a loop for the number of items in that table when they rejoin and look for them in the place where you keep your tools.