I know how to make it the old way but I wanted to use the same inventory across different servers from the same place so I would apreciate if anyone could help me out on turning this on to the most recent version.

	game.Players.PlayerAdded:connect(function(player)

	    local inventory=player:LoadInstance("Inventory")or Instance.new("Model")

	    inventory.Name="Inventory"

	    inventory.Parent=player

	end)

	game.Players.PlayerRemoving:connect(function(player)

	    player:SaveInstance("Inventory",player.Inventory)

	end)

I know how to work with data stores when its me creating the tables, not when im using something already created by roblox.

4 comments

0

You used an or, so I don't know if you know if the script should load or create a new Instance

0

So, I think you should have local invSaved = player:LoadInstance("Inventory") then, local model = Instance.new("Model")

0

This seems to be deprecated.

0

Simply put the gears into StarterGear (it's in the player) and the inventory (if you want the player to own the gear immediately)