Hi how do I make a shop gui that saves your purchases that can be re-equiped or be swapped between shop items (shop and inventory combined)
ex: like guns
and can be viewed in a inventory ui
im trying to make something similar to a wave defence
You need to save data about player in his stats, and when he loads into the game you need to load his stats from DataStore
Then you need to check in inventory script if your player have this item in stats and thats all!
Alright well based on my understanding i think you need to assign a bool value to each one, whether with tables or instances, and if it’s true that means it’s bought and can be equipped.
If you need an example to get started you can do something like this (just remember i’m not an expert at GUI’s so i can’t tell you what to put for display values):
inventory = {}
for y = 1, 5 do
for x = 1, 5 do
slot = {
x =, --anything here like 20 or something i'm not sure
y =, --same thing,
price = 20,
bought = false}
table.insert(slot,inventory)
end
end