Open Source Advanced Inventory System

I do like this a lot.

It would be cool if this compressed the inventory data; if it doesn’t that-

Now that I think about it I can make a inventory handler Module or something (for my “framework”) which allows for stuff like that, well hope everything is good;

2 Likes

BTW to anyone using this: the viewportframe script can be really laggy, depending on your device, you may want to disable it, or if you’re good at that kinda stuff, reduce the lag…somehow…

2 Likes

thank you so much, this is amazing!

2 Likes

Is there a way you can add equipable accessories to this?

1 Like

Don’t think so, but maybe if you copy the shirt function and change the value inside of it.

2 Likes

How do you make it work with grouped/modeled parts? It seems like it only works with “MeshParts” and “Parts”.

Update: I figured it out in the localscript (under “inv” from StarterGUI) and did some changes:


Here is the file if you wanted to test it out.
Now work with models.rbxl (89.6 KB)

2 Likes

Thanks for your contribution! :slight_smile:

2 Likes

Big thanks! It’s really fun to play around with it.

1 Like

Really amazing source thank you for sharing! I’ll be trying this out for sure.

1 Like

Need to fix this! You can’t drop items :frowning:

1 Like

When will you add support for stacked items?

1 Like

doesnt work for me, not sure why

1 Like

Very Good, Thank you for giving out this Advanced Inventory, it’s really cool, It saved me a lot of time.

I’ll be designing this to my style and might remove some things that i don’t fit with. But really, Thank you so much although it’s late :slight_smile:

2 Likes

ServerScriptService.Events:104: attempt to index nil with ‘Weight’

1 Like

Now work with models[DROP].rbxl (100,9 KB)

game.ServerscriptServicie.Events

--Plr wants to drop an item
senddrop.OnServerEvent:Connect(function(player,itemname)

	if game.ServerStorage.Inventory[player.Name]:FindFirstChild(itemname) then
		local item = game.ServerStorage.Inventory:FindFirstChild(player.Name)[itemname]
		if item.Amount.Value == itemsmodule[itemname]["Amount"] then
			item.Amount.Value = item.Amount.Value - itemsmodule[itemname]["Amount"]
			item:Destroy()
		else
		item.Amount.Value = item.Amount.Value - itemsmodule[item.Name]["Amount"]
		end
		game.ServerStorage.Inventory:FindFirstChild(player.Name).Weight.Value = game.ServerStorage.Inventory:FindFirstChild(player.Name).Weight.Value - itemsmodule[itemname]["Weight"]
		print(game.ServerStorage.Inventory:FindFirstChild(player.Name).Weight.Value)
		local newitem = game.ServerStorage.Items:FindFirstChild(itemname):Clone()
		newitem.Parent = game.Workspace.Items
		newitem.PrimaryPart.Position = game.Workspace[player.Name].HumanoidRootPart.Position
		UpdateInventoryUI(player)
	end
end)

And put on each model the corresponding primarypart of that model.
And add a weld to all parts of the model to the main one.

5 Likes

Does this still work? I tested it and it doesn’t work.
image

1 Like

Is there value Weight inside it?

1 Like

Everything seems to work but I made my own Sword and it can equip and stuffs but the problem is dropping it… It shows me this error PrimaryPart is not a valid member of Tool “Workspace.Items.Greatsword” What does this mean how do I fix it?

1 Like

Differentiate between parts/model and tools when dropping an object. Because in tools you can’t get the PrimaryRootPart nor its location (only with its Handler member).
And use better :PivotTO(), because PrimaryRootPart is becoming obsolete.

DeveloperHub: PVInstance:PivotTo

Documentation (BETA): PVInstance | Roblox Creator Documentation

3 Likes

Hippity Hoppity your code is now my property. Thank you so much for open sourcing this, this will help lots of games! I will be sure to credit you if I use this.

3 Likes