I've been looking at making a custom inventory system and since the games I've been playing recently are fisch and grow a garden, I've noticed the similarities, one of them the inventory system, I was just wondering if this was a custom inventory system or a modified backpack, and if it's modified could anyone link me a guide on how it works ?
#Backpack VS Custom inventory system
1 messages · Page 1 of 1 (latest)
I've asked gpt and it says that it's a custom inv system
I got the impression that it was different because the way you access it is the same, but apparently you just disable the backpack and make a custom one, I'm following this tutorial to learn how, It's pretty good imo
In this video, I show you how to make a CUSTOM INVENTORY GUI in ROBLOX!
👇Join the DISCORD server to send your video ideas!
https://discord.gg/howtoroblox-community-592802707991953443
✨Get early access to models, including upgraded versions on my Patreon...
oh yea
I've been looking for tuts for a longgg time
this has to help
cause my hotbar is separated
you have to disable default roblox inventory with startergui service and then make your own ui and then script it and yeah thats all
yea
disable the roblox backpack ui
then u gotta make ur own ui
then make events for when a tool is added, removed, used, etc.
it took me 1-2 days
on my first time
function validateSlot(player, slot)
--makes sure the slot is an instance and that it's a tool
if typeof(slot) ~= "Instance" or not slot:IsA("ObjectValue") then return end
local inventoryFolder = player[inventoryFolderName]
local hotbarFolder = inventoryFolder[hotbarFolderName]
local backpackFolder = inventoryFolder[backpackFolderName]
--makes sure that the slot (ObjectValue) is in one of those 2 folders
return slot.Parent == hotbarFolder or slot.Parent == backpackFolder
end
function swapSlots(player, slot1, slot2)
local slot1TEMP = slot1.Value
slot1.Value = slot2.Value
slot2.Value = slot1TEMP
local inventoryFolder = player[inventoryFolderName]
local backpackFolder = inventoryFolder[backpackFolderName]
if slot1.Parent == backpackFolder and not slot1.Value then
shiftBackpackValuesDown(backpackFolder, slot1)
elseif slot2.Parent == backpackFolder and not slot2.Value then
shiftBackpackValuesDown(backpackFolder, slot2)
end
end
SwapSlotsRE.OnServerEvent:Connect(function(player, slot1, slot2)
if slot1 == slot2 then return end
if not validateSlot(player, slot1) or not validateSlot(player, slot2) then return end
swapSlots(player, slot1, slot2)
end)
im having issues with this
idk why it's not working
im recording a vid but i have no clue why it's not working
why tf do u have server event for swapping slots
server should only verify when item is dropped or picked up
the tutorial said so
this guy 😭
okay okay, but is the basis good? like this part
function createInventoryFolder(player: Player)
--made the inventory folder
local inventoryFolder = Instance.new("Folder")
inventoryFolder.Name = inventoryFolderName
inventoryFolder.Parent = player
--made the hotbarfolder and parented it to the inventory folder
local hotbarFolder = Instance.new("Folder")
hotbarFolder.Name = hotbarFolderName
hotbarFolder.Parent = inventoryFolder
--added the objectvalue (hotbar slots) to the hotbar folder
for i=1, numHotbarSlots do
local hotbarSlotValue = Instance.new("ObjectValue")
hotbarSlotValue.Name = i
hotbarSlotValue.Parent = hotbarFolder
end
--made the backpack folder and parented it to the inventory folder
local backpackFolder = Instance.new("Folder")
backpackFolder.Name = backpackFolderName
backpackFolder.Parent = inventoryFolder
end
just to know where to start from
😭
nah
fml
also dont make values for hotbar slots
thats not very intelligent
client can control that
dawg i was questioning it whilst watching the tutorial but i just didnt change it 😭
Yeah i noticed, like
i questioned it, but siad this guy probs knows better
so the server should clone the pre made inventory from RS and then manage the values of the items and shit server side
but like
** You are now Level 5! **
i need to learn how to send like oh, i've picked up ts, how does the client tell that to the server securly ?
fire to server which item the client wants then do security checks on server
is client within pickup range? is the item even dropped to begin with? does the client have enough inventory space? can the client pick up the item?
okay oaky
so the client on a local script has a pickup script that sends a remote event to the server ?
yes, client requests to pick up item and server validates whether they can pick it up or not and then gives it to them if they can
same with dropping items
gl
ngl bro
the tutorial suck
so I just watched brawldev scripting course
but I'm boutta make it soon fr
i noticed
wait so when you're making the hotbar, what do you do ?
like
make ui
if i cant make objectvalues
no like the backend
likle
if im not useing objectvalues for the slots
how do you make them ?
you dont need values for the slots on server side
just store the player's inventory items in a folder and let the client manage their slots/ui
So just like, make a template with the inventory table and clone that for every player ?
and in that table put the items ?
yeah if u want
learn
about uis
like events and shi
functions
also
unequipped
equipped
backpackupdate
and textures
those are the one you should focus on
and just basic knowledge
you'll be good
okay oaky, thanks