#Nem's Backpack Module (BackpackManager)
1 messages · Page 2 of 1
return is needed because params func is only used to assign a variable name to the params
No the params is literally the callback function, which contains the parameter names and types.
I got it working perfectly without any kind of return parameter
show me
Well here's Signal+'s updated Signal type:
export type Signal<Parameters = (...any) -> ()> = {
Connect: typeof(
-- Connects the given function.
function(signal: Signal<Parameters>, callback: Parameters): Connection end
),
Once: typeof(
-- Connects the given function, but disconnects after first fire.
function(signal: Signal<Parameters>, callback: Parameters): Connection end
),
Wait: typeof(
-- Yields the current thread until the next fire.
function(signal: Signal<Parameters>): Parameters end
),
Fire: typeof(
-- Fires all callbacks and resumes all waiting threads.
function(signal: Signal<Parameters>, ...: Parameters) end
),
DisconnectAll: typeof(
-- Disconnects all connections.
function(signal: Signal<Parameters>) end
),
Destroy: typeof(
-- Disconnects all connections, and makes the signal unusable.
function(signal: Signal<Parameters>) end
),
}
It does contain a few typeof, which is just a little trick to get comments/documentation for the functions.
Oh wait nvm
It's right that for Wait and Fire you can't just put in the function, and you have to use a seperate parameter.
That's frustrating
I really want there to be a better solution.
I hope in the new type solver there will be some sort of things like that, the actual is really limited for example for this, Idk how their signals are internally type annotated but we'll see how it goes 👍
Yea it's very weird how their internal typing works. It seems weird that they have to complicate things with 2 different methods of typing. Their internal one has also supported way more features for a while and still does... weird.
The day you can comment typed properties, methods.. they will cook
how do i show tool tips
hover your mouse over the tool
doesnt work
well its a "tool tip"
Just go in the properties of the tool and change the tooltip
im so stupid sorry guys
how do i destroy a tool without it breaking the module
Destroying a tool shouldn’t break the module
nvm im pretty sure i know why
is it something on your end?
I was considering adding a warning if you start the backpack in a script that is not in playerscripts or replicated first
When DevForum post? This could do well.
devforumn full of haters
Yea that's true.
You can get a few helpful replies though.
I was planning some time in the summer because the thing is with a devforum post is people might have issues sortly after a resource has been published or even discover some bugs and I don't want to be working on this while I'm busy with school work
this is amazing
this is really really awesome
one suggestion is auto expanding tool tip box, which supports new lines. would be cool!
new lines arent really supported for tooltips
you can just do automaticsize tho right?
You attempted to pass a tool into a function that is not parented to the backpack or character
An example of this is if you try calling BackpackManager:Equip() on a tool that is in the workspace
The backpack cannot act on these tools because it would cause replication issues.
whats a tooltip gng and how do I use it 🙏
go to ur tools actual properties and you can set it at the top
What was updated on the March 29 update?
#1311159199148933150 message
It was last updated March 30th
Does it have stackable tools in the same slot
no backpackmanager doesnt natively support that you would have to program that yourself using the api
#1311159199148933150 message
I've mentioned how you could do it in the past.
how can I disable the back pack icon, and have no way for the user to open the overflow backpack ?
so only the hotbar is seen,
Backpack:DisableInventory()
Next update I was planning to add a function to disable the backpack icon
also does drag and drop a tool into the workspace work? when I drag it , the slot icon moves , but then it goes back into the slot,.. the tool has drop enabled
but still allow the inventory to be opened
you need to program that in using the .DragEnded signal
I believe I had an example from a few months ago
because scripts may potentially reset in startergui
which any type of reset may break the module
how are your requiring it, and getting it into StarterGui... I am using this but then ur code errors out
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
-- Get the BackpackGui (ScreenGui) from ReplicatedStorage
local backpackScreenGui = ReplicatedStorage:WaitForChild("BackpackGui")
-- Find the BackpackManager ModuleScript inside the BackpackGui
local backpackManagerModule = backpackScreenGui:WaitForChild("BackpackManager")
-- Require the BackpackManager module
local backpackSystem = require(backpackManagerModule)
-- Based on the user's example context (BackpackScript.StartBackpack()),
-- attempt to call a StartBackpack function if the module provides one.
if backpackSystem and type(backpackSystem.StartBackpack) == "function" then
backpackSystem.StartBackpack()
print("InitializeBackpack: Backpack system started via StartBackpack().")
else
print("InitializeBackpack: BackpackManager module required, but StartBackpack() function not found or is not a function.")
end
Make a script in StarterPlayerScripts then require the backpack and call .StartBackpack()
37.221 Stack End - Studio
11:12:37.222 Infinite yield possible on 'Players.Lord_BradyRocks.PlayerGui:WaitForChild("BackpackGui")' - Studio
11:12:37.222 Stack Begin - Studio
11:12:37.222 Script 'ReplicatedStorage.BackpackGui.BackpackManager', Line 47 - Studio - BackpackManager:47
11:12:37.222 Stack End - Studio
The backpackmanager gui isnt in playergui
Where is the BackpackGui screengui
because that is supposed to be in startergui
but the actual localscript that calls startbackpack is supposed to be in StarterPlayerScripts
And also if your character doesn't load then you may get that warning
that is supposed to be in startergui not in replicatedstorage
you said put it in R S....
I said you can put the module there
but not the actual screengui
ill add clarifications
oh
DOH
Maybe an example place that is editable would cut down on my silly config questions... just bare bones ..
There is an example place
Which is uncopylocked
It’s posted at the top of this resource
when do you think ur next update is coming?
... drag and drop would be sweet... 🙂
It won’t add much but probably in a month or a week
Right now I’m busy with finals so I don’t have too much time
ah ok.. focus on school
That’s weird, it may be caused by a race condition. It will be fixed next update
I wonder what else you can break
oh I see
for some reason this can show even after you close the inventory
For only about a second tho
When you close inv and then hover to item
Oh I see why this happens
I think? lol
Most of those bugs can be easily fixed but I hope non of them caused the module to fully break or become unusable
Something is really messed up for me rn I think
But idk what it is
Will have to record ig
Cuz no errors but its acting weird
Ye record it
Watch ? and millions of other Roblox Studio videos captured using Medal.
All I am doing is clicking (NOT HOLDING CTRL)
And idk why its acting like that
Some of them work fine but others are being moved and snapped around weird
I wonder if it thinks you’re dragging for long enough
I am just clicking idk
And its consistent cuz I can't recreate it with the 2nd slot
Are you able to recreate it in-game at all
Yea it is
Alr then I will try it there
How am I switching the spots of 2 slots?
Is that a feature?
Swapping?
yes
yes that is a feature
Hows it work
You take one slot and drag and drop it over another slot and they will swap places
Great I recorded bug and it wasn't even recording roblox
yummy bugs
Can't seem to recreate the swapping issue I was talking about
But I think its the same related thing
Watch Here and millions of other Roblox videos captured using Medal.
And I think its due to what I am doing here
Dropping the item while dragging it and such
I am just clicking in this too btw
Aye got it now
Alrighty if you can post more videos of any more bugs you find I’ll fix them when I have the time
Watch Roblox and millions of other Roblox videos captured using Medal.
Same as other just more lol
But I think most of those bugs are caused by the animate feature
I mean their changing spots when they shouldn't be so idk
Actually I think I see wym
Ye so there’s a small delay with executing code in some cases when the animate feature is on
So when swapping tools, moving them or anything when the animation is finished I usually check if the tool still exists
Should be able to connect to ToolDropped and end the dragging ?
No so if the tool is deleted from the tool slot while dragging the “slot” just gets deleted
But it’s not the actual slot it’s just a clone of it
The real one is unaffected and is just invisible
Ah
Though thankfully most of those bugs do not break the entire module and are just animation based bugs 
I really wish I could figure out what causes this but it seems to like only happen in studio sometimes
Its same thing in the demo game tho?
It is?
Seems like it?
You replicated it by clicking once right?
Yeah these are all single clicks
And without holding ctrl
Looks the same as that Studio one
Okay I’ll investigate when I have time
There does seem to be a scaling issue with the inventory
On small devices it can be pretty bleh
like this
It looks like this on my phone but not as bad lol
pairs?
pears
pairs and ipairs are not needed anymore
But doesn't make difference if you have them
you save 2 seconds of time by not typing them
ipairs might make a difference
since it stops at nil and some other behavior
but ye GI ftw
That’s the only device where that can happen so I’m not too worried
And you could always make it a tad bit smaller on smaller devices
It does
Generalized iteration is faster.
These are my benchmark results:
local array = {1, 2, 3, 4, 5, 6, 7, 8, 9}
return {
Runs = 10000,
Functions = {
["ipairs"] = function()
for index, value in ipairs(array) do
end
end,
["pairs"] = function()
for index, value in pairs(array) do
end
end,
["next"] = function()
for value in next, array do
end
end,
["Numeric"] = function()
for index = 1, #array, 1 do
local value = array[index]
end
end,
["Custom numeric (while)"] = function()
local length = #array
local index = 1
while true do
local value = array[index]
if index == length then break end
index += 1
end
end,
["Generalized"] = function()
for index, value in array do
end
end,
},
}
Generalized is the most clean and the 2nd fastest. If you really want optimization, then next is slightly faster.
Does this not work?
measure it with real work under each array
Anyways use whatever you want
Oh lol I didn't know. I don't know how I got to that conclusion then.
Shouldn't make a difference.
It would only make it less reliable
I should only measure the loop itself.
Not any logic inside
Not true.
ipairs has its uses.
pairs is absolutely useless though indeed.
Isn’t pairs just a bit faster?
depends on what you doing
No it's slower
Most of my expensive iteration just does i = 1, number
next is the fastest, but I recommend generalized.
Oh noes
Look at my benchmark
That is one of the slowest options
I heard that was one of the fastest iteration methods
Yea it's not
It's only used for counting
For iteration it is slow.
Just do
for index, value in someTable do
end
I’ll change that up next update
interesting seeing next at the top
Because test was unfair
?
index missing?
Was just index vs index and value yea
Here's a new test where next includes index and value:
why is next cooking tho
Where are you calling .StartBackpack() from
starter gui
Does your gui have reset on spawn on by any chance?
idk
no its off
So my assumption to what’s going on is that whatever script you are calling startbackpack from is being reset or deleted
Which is why I recommend creating a script in starterplayerscripts and starting it from there instead
okay i will try that
is this a plugin? wat is that
boambomber benchmarker I think, he also modified it cuz it was a bit buggy
Yessir 😎
is there any way to make the UI scale instead of Offset? On PC it looks great, but on Mobile it is wayyy too big
@woeful rose is this possible with some setting by any chance or will we have to manually change everything to scale ourselves
Apologizes, the next update should hopefully address this. For now you could try changing the inventory’s size if on mobile to be smaller
I will say though typically modern mobile devices do not have screens that are that small
thank you!! 🙏
that was using the iphone 14 device, this is what it looks like on an actual phone for ref
i took this screenshot on my phone (iphone 15 pro)
Mmm okay I’ll add code to manually shrink the inventory UI in cases like this.
Apologies again
Version 2.1
- Bug fixes
- Update documentation to add documentation on settings
- Adds new settings: ShowBackpackIcon, ShowInactiveHotbarSlots
- Adds LocalScript that starts BackpackManager
Documentation: https://nem999.github.io/BackpackManager/home/
@woeful rose is Version 2.1 the one where the backpack's UI is fixed for mobile since this is the next update, all good if not just wondering
Yes, if you import the latest screen gui into your game you should notice there is a new LocalScript.
This new LocalScript changes the size of the UI to be bigger on TV screens and smaller on small mobile screens
It also starts the backpack for you
I see that now many thanks!! 🙏
@rotund saddle If you have the time could you see if you're still having dragging issues on the latest version?
I think I found what was causing it
What's not working anymore?
can we make stacked items in this? @woeful rose like a mining system and we can have multiple ores inside one slot.
#1311159199148933150 message
ok
good module
Hey whats this testing software used just curious, I want to try some of my own code on this
Boatbomber's benchmarker plugin
It's paid.
Have you made a DevForum topic about this yet?
Rarity displays and tooltips please 😮
wdym?
rarity displays 😭
Uncommon, Common, Rarities like grow a garden or other games possible mutations of items
That’s your job to add 😃
This is just a reskin / remaster of Roblox’s backpack system
^ This
The module has all the tools necessary for you to add custom features like that
when are we getting this level of smoothness? https://www.roblox.com/games/14042191576/Inventory-UI
easy to do when you don't give mobile and console support
do it then 👀
smoothness is not more than just know how to animate
But yes of course mobile and console support adds complexity.
There's a lot of things going on there. More than it might just seem like at first glance.
ngl didn't see it, I'll look at it when I can
Here's the guy's showcase video: https://www.youtube.com/watch?v=Y-MSuSDVEIg&ab_channel=Dino
My inventory UI was designed to be flexible, modifiable, intuitive and feature all of the features of a normal backpack system. Which means full controller, mobile and VR support. While I agree people definitely have better skills than me at UI design I also made the choice to design a UI that fits into most games so I didn’t go overboard with the animations and whatnot. The biggest advantage backpackmanager has over others is that if you don’t like something you can likely change it
Yea it was kind of a joke. Not really an easy task nor the goal of your resource obviously.
Bug: The first time you force an item into a Player's Character (so in their hand) with a full hotbar, and their backpack is closed, it'll show the "Equip" Frame on it. However, every time after this happens (Until the player resets) this won't happen. Video attached shows what I mean and is explained with my voice as well
Def a bug lol
There was a bug similar to that in the past
Highlight should not appear on tools that are in the backpack if the backpack is closed of course lol
Seems like it should be an easy fix
yea cuz it fixes itself after the first time
Exactly
Yeah thats a bug I'll look into it later today
This is huge update
@frank wolf if you can confirm that the bug is fixed that would be nice
has the roblox model been updated since that's how i normally got it (idk how to do from github)
wait nvm found it on github
ok ill check mb
yes the model always gets updated
so you can go to that or to the github for the latest release
from my testing the issue is fixed thank you for the help!! 🙏
goat furret




Version 2.2.1
- Fixed random error
- Fixed some drag offsetting issue
- Changed how large and small screens are detected (before only mobile screens could get the small inventory layout now small VGA monitors can get the layout)
- Created devfourm resource: https://devforum.roblox.com/t/backpackmanager-a-customizable-plug-and-play-backpack-system/3957165
Do you have a game that is using BackpackManager? Let me know!
An open source fully fledged backpack replacement to Roblox’s default backpack script. 🎓 Documentation | 🎮 Demo Place | 🧩 Creator Store | 📑 GitHub ❓ Why would I want to use this over Roblox’s supplied backpack or other alternatives that already exist? Roblox’s supplied backpack doesn’t give you the developer much cont...
Special thanks to @pastel stream for making the icon (he really cooked with it)
And @rotund saddle for doing a lot of early testing
mb the links look similiar but its cause theres a normal + 18+ version of the game (its a social game)
Oh that’s awesome has it been working well with your players?
yes it works perfect, the only issues being what's i've previously reported (mobile size issue, selected icon still showing) but you've fixed all of them so it's perfect
super minor but noticed this in the .rbxm for Version 2.2.1, but you have PlayersService.LocalPlayer twice in the BackpackScript Local Script
Yep, that is intentional
The line checks if the LocalPlayer exist if not then it waits for one to be created then it will go to the next or which will be the LocalPlayer
o ok, may I ask why add the :Wait()? I've always just done local LocalPlayer = Players.LocalPlayer, I've never had to to use :Wait() for that. Has it errored for you sometimes without the :Wait()?
:Wait() yields until the LocalPlayer property in the Players Service changes but GetPropertyChangedSignal doesn’t return anything which is why we need the extra or
o sorry i meant like why add the entire line PlayersService:GetPropertyChangedSignal("LocalPlayer"):Wait() at all not just the :Wait()
like I would just use
local LocalPlayer: Player = PlayersService.LocalPlayer
instead of
local LocalPlayer: Player = PlayersService.LocalPlayer or PlayersService:GetPropertyChangedSignal("LocalPlayer"):Wait() or PlayersService.LocalPlayer
ohhhh that’s because if the script is ran in ReplicatedFirst there is a slight chance the script will run before Roblox has created a LocalPlayer
oo ok that makes sense thanks
IS THE ABOVE ADDED TO THE LATEST OR NEXT RELEASE, TO WAIT A BIT TO GET THE LOCALPLAYER GOING.. i HAVE SEEN THAT A FEW TIMES IT IS GOOD TO PAUSE A BIT TO LET THE CLIENT GET GOING FIRST.
OR SHIZZLE CRAPS OUT.. SOMETIMES
It’s always been in the latest release
@woeful rose localplayer is going to always be there
I believe a couple of years ago Roblox had in their documentation that scripts in replicated first could have a nil LocalPlayer but that does not to be the case anymore?
I think that is not really a problem now and even if you try to run a localscript in replicatedFirst it is going to be there as a localScript cannot run for a player that does not exist yet
Yeah this was removed a little bit ago and I was not aware
This is what Roblox staff said about it recently
Local scripts don’t need a LocalPlayer to run
I love you!
what a stupid thing to worry about ngl, why do they make this so hard to predict lol
a setting i recommend is "ShowToolNumber" which toggles whether or not the number for tool slots shows
its very easy to do without tho just need to set TextTranspenarcy on ToolNum to 1
also a setting that disables players being able to click/select backpack items entirely (but also can be done by turning off Interactable on Button)
also Perform is misspelt (It says Preform)
I believe the function :SetSlotEquipable does this
Yeah, I was thinking of something to disable some internal behavior of the backpack but I'm just unsure how I should go about implementing it
Version 2.2.2
- Fixed an error relating to spamming
Player:LoadCharacterAsync() - Fixed an issue where .ToolEquipped and .ToolUnequipped signals could fire at inconsistent times
- By default tool numbers will no longer show if the player doesn't have a keyboard available.
- Updated BackpackScript
- Added settings:
IconScale,ShowToolNumberandToolEquippingDisabled
changes have been uploaded under the roblox model and not github yet
Roblox moment
gotta fix that
not github yet
its fixed
They really dunked you
They really forgot how to speak english 🤦♂️
is there a way i can reduce the size on phone? Maybe like 25% smalle, its huge @woeful rose
In the settings there should be a setting called icon scale you can set it to like 0.75 if you want it to be 25% smaller
where do i find this setting
is this a new version?
nevermind it seems i had the older version
Yeah it’s in the newer version
Version 2.2.4
- Adds function
BackpackManager:ResetGui() - Remove max hotbar slots check (You can now have more than 10 hotbar slots!)
- Add signals to check for input device changes
- Fix tool hovering not working for touch screen laptaps.
- Fix unrecognized keycodes throwing an error.
- Fix visibility bug
I like how this still gets updates
cause its goated 
Is it possible for other tools to use viewport only and others text only?
Yes, use the :SetViewportEnabled() function on your target tool
h
is there a way disable the tweening animation? nvm i found it
does this system have a max inventory size
like max tools that can be in the inventory at once?
if so no
you could practically have infinite but i wouldnt recommend that for performance reasons
the module tries being very cautious with iterating through the entire tool list though
yeah like you can only have 30 inventory slots or smth
no, you can have an infinite amount
yea you can
what happens when i pick up something and i have reached max? will it not let me pick up
there is not artificial max set by the module
the only max there are is max hotbar slots and in that case they would just go to your inventory
does that mean i get infinite tools in the inventory because i do not want that
yes, it would mean that
i can just modify your system
and if you do not want that you simply just do not allow your player to pick up more than a certain amount of tools
theres not really any need to modify the system for that
Is it possible for the items to have amounts like this?
I kinda added this
found a bug
are you on the latest version
Did you make any changes like implementing custom behavior?
Its straight from the toolbox, and setting viewports setting to true.
Oh the viewport setting? Hmmm I can test that out today
So turns out this is because line 1190 is grayed out
just remove the grayline and that should fix it
I forgot why I grayed that out i was probably tired or something
I'll release a fix prob later today
is this still maintained?