Ok so im trying to figure out how i can make a specific code run when a specific object is put into the character
My current way of doing this is cloning a script in replicated storage that has the objects name then putting it inside the character, though my problem is i want it to execute unequip code when the object is destroyed (which is impossible since all connections are disconnected) So is there a better way to do this? Im thinking it has something to do with modules probably
think of equip code and unequip code stored in a script i want another script to require that unequip code when a object is destroyed (the tool)

2 comments
The thing is i have different equip functions for each item for example a apple i want the player to click then have it destroy and for example a chair i want the player to click the ground then place it there so im guessing i need tons of "ToolModule.Equip = function()"
no no, you can do this: in the function, add a parameter of the item, then you can do the code like: if item == "apple" then do equipped code