icecatz
(icecatz)
June 5, 2020, 2:55pm
#1
so I’m trying to make a saving system for simulator style backpacks using datastore2
since I can’t save objects how can I save the backpacks the player owns and what backpack they are wearing
I’ve tried using a table in my datasote2 but since tables cant be put on explorer I can’t access it form other scripts
local BackpacksDefault = {
["lil Tank"] = false,
["Medium Tank"] = false,
["MEGA tank"] = false,
["Big Tank"] = false,
["Star"] = false
}
1 Like
Zombiefin
(Zombiefin)
June 5, 2020, 2:59pm
#2
You could create an array like this
local Backpack = {}
Then you can add items to the backpack and then save the array like this.
I made a dev forum post a while back when I was having issues with saving items perhaps the solution to mine could help you too (Or could help you create one):
So I am trying to make a system where the game saves the weapons skins you earn from crates and it seemed to work at first but when I tested it out with a friend he had all the items I had in his inventory as well. Could maybe someone else tell me where I might have messed up in my code.
Code is below:
local skinfolder = nil
game.Players.PlayerAdded:connect(function(plr)
local key = "id-"..plr.userId
pcall(function()
skinfolder = Instance.new("Folder", plr)
skinfolder.Name = "skinfolde…
1 Like