#Need help with fixing Inventory system
170 messages · Page 1 of 1 (latest)
Send photo
Inventory script that checks stuff
Inventory script that makes textbutton
Crafting script
So yeah when an item gets picked up it makes a TextButton for it in the InventoryGui
Hm
And when a player clicks that button the item gets dropped
so the problem is that when i craft the stuff the textbuttons dont disappear
Ok I see
probably the "WoodItemButton" and "BoxItemButton" is the wrong stuff
just idk if theres a way to find the right button for the right item and delete it after crafting
Ok so
Your saying that
When you press the craft button known as "CraftButton" The text doesn't disappear?
Oh
Ok
like they do the same but they wont drop the item
** You are now Level 1! **
The buttons disappear and the wood "items" doesn't work am I correct?
i mean the buttons dont work
Oh
wait lemme make a vid on how it works
Ok
Ok
I'ma look
Their is 100 different things going on in one video
😭
But I saw the problem
so uh how am i supposed to fix dat
I'm not familiar with your game style
Explain what is happening at this part
so as you could see in the first part when i picked up an item it created a Button for each of them in Inventory
and when i clicked a button it dropped the item
in this part when i clicked those 2 buttons the items didnt get dropped
Ok
so yeah 4 items in inventory = 4 buttons in inventory. then 2 items in inventory = 2 buttons in inventory bc i crafted
I fully understand now
yea
Can you show the code exactly for that?
this was after i clicked 2 remaining buttons which didnt work
locked parent?
idk what that
Dw
It's just in Studio, it isn't from ur script I believe
So those two items don't drop right?
yeah
** You are now Level 2! **
😂
Do you parent it in workspace or smth?
yeah the original items are from replicated
wha
then how am i supposed to make multiple of the same item
Clone can get rid of your ordinary item and just place one more
It's like y'know this process
uhh
--Clone me()
--Cloned
--Amount of clones = 1
--Clone me()
--Cloned
--Amount of clones = 1
What I'm trying to say is
if you're cloning it, it'll just get that replicated item and make the previous one disappear
so there can only be 1 clones at once?
But the thing is you're only doing this once
You can manipulate it
so should i change the script or what
Not yet
I could be wrong, bcuz you're only doing it once
so both items should've dropped I assume
it depends on how you did the process of your cloning tho
u can scroll up i alr sent all the scripts i used here
@sinful raft Send me a screenshot of the script line that has the clone
The thing is my eyes hurt.. I'm quite tired today 🤧
i mean i use remoteevents
so am just trying my best to understand this fully lol
so this script checks if an item gets added to inventory then fires the event if yes
and this one creates a textbutton for the item when the event arrives
then if the button is pressed, the button gets deleted and it sends back the event to the first script
and in the first script when that event arrives after the button was clicked, it drops the item
so yeah this part works for now the problem is with just the crafting
it doesn't drop it right?
yeah
just disappears?
the crafting script removes the 2 items that are needed for the crafting and it also removes 2 buttons with the names of those items
And you did say it parents to workspace when dropped
yeah
Alright, check your explorer > workspace and check if the items are not nil
Do the crafting thingy, and check if it's in workspace
If not, then try to find where those both are parented to
Btw, what is this supposed to be?
it destroys the 2 items that were used for the crafting
i just gave them random names for now btw
I'm pretty sure that's the problem :')
hmm
And you're saying it clones right?
yeah
And where does the clone parent it to?
yeah
like the item is a clone from replicated
Since it's in replicatedStorage
and when i pick it up that clone gets parented to the Inventory folder
Ah, I see
and if i click the button in the gui it parents back to workspace
and then the :Destroy
yeah
yes only in inventory
if it got destroyed in replicated the clones would stay and the original item couldnt be cloned anymore
When you do the crafting, are the items still visible in ReplicatedStorage
or are they gone
they stay there
** You are now Level 3! **
Yeah, that's what I'm wondering
they just get cloned
Did you check btw
ye theyre not
i mean when they are dropped
bro the problem is just that something goes wrong with the buttons in inventorygui after i do the crafting
it has to be smth with the crafting script
like should i send back an event or
Wait wha?
u saw the vid
Mhm
at first i picked up 4 items and it made 4 buttons and they all worked
then i crafted
the crafting removed 2 items and 2 buttons
but the remaining 2 other buttons didnt work after
so a button drops the item from inv, but after crafting, those buttons wont drop the 2 remaining items from inv
for some reason
i just gotta know what is locked parent
