This isn't a request question, don't worry.
I'm currently working on a combat game in which I want to have an inventory system for weapons. Games such as Phantom Forces and Murder Mystery 2 have this feature, where they can data store the player's skins/weapons at ease. I've seen numerous posts on the DevForum and Questions here about this, however none of them make total sense to me.
If anyone has an idea, please answer!
The proper way to convey your request is more along the lines on "How to save a table". The only way to do so on Roblox, excluding HttpService, would be through DataStores.
Let us break down what we are trying to do and how first. The simplest way to explain it is how to save a table use DataStores. Although, you specifically discuss an inventory, showing we need to save information on a player-to-player basis.
local DataStore = game:GetService("DataStoreService") local InventoryData = DataStore:GetDataStore("Inventory") -- This is where related data will be found game.Players.PlayerAdded:Connect(function(Plr) if not InventoryData:GetAsync(tostring(Plr.UserId)) then -- Does a previous save exist? InventoryData:SetAsync(tostring(Plr.UserId), {}) -- Save a table to their save end end)
Please keep in mind, all the above code does (assuming it works, did not use studio to type or test) is save a table to the player under a key, key
being how you get their unique data, which is their userid. We use a userid because it will never change for their account, unlike name which can be changed.
If there are issues or questions, feel free to comment below!
Almost forgot, here is a great link on how to use DataStores