Hello, I’m currently attempting to make a gun system that relies on a single module script to load the code for all the guns that are put into the player’s backpack. In an effort to try to keep the scripts to a minimum, the only script within the guns themselves is a module script that has the specific configuration for it. What I’m trying to achieve is that when a tool is added to a player’s backpack, it loads the code. I currently have a local script in StarterPlayerScripts that is going to handle loading the code for the guns, however when using the.ChildAdded event on the backpack folder, it fires every time you unequip the weapons and doesn’t fire when you first load in. I was wondering what the best way to check when a player has received a new item in their backpack would be.
TLDR: How should I go about detecting when a player gets a new item in their backpack without it firing when they unequip it, and firing when it’s first added?