Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is correct way to remove a tool from a backpack? [closed]

Asked by
vovik 9
5 years ago

Hi guys! Sorry if I ask a stupid question, but I did not find it on the Internet. So i am working on an inventory that should stack same items - if picked up item already exists, it deletes it and adds +1 to the existing counter.

When it detects same item it Destroys it. After :Destroy() it shows this message in console "Something unexpectedly tried to set the parent of Apple to NULL while trying to set the parent of Apple. Current parent is Backpack."

It keeps the tool object, but removes all his children, so i need to run another function to check for empty tools and destroy them again. Is there a proper way to remove tools when added?

THANKS :)

Closed as Primarily Opinion-Based by User#24403

This question has been closed because it is a discussion about a topic focused on diverse opinions, which isn't a good fit for our Q&A format.

Why was this question closed?