I currently have around 700 almost identical parts in my project to which i need to add custom destruction logic too. I need to have them acting independantly, for example if one part gets destroyed, only that specific part gets destroyed. The only difference between the parts is their location on a grid that i have constructed.
Initially i thought of using dynamic variables to get past this, but after quite abit of research found that they were heavily frowned upon and that i couldnt even call the variable up anyways.
I then looked into the metatable stuff but cant exactly see a solution there, but i might be wrong.
I need a way to wrap each part with my own custom properties, and have it so that each wrapped part is individualised and doesnt take down the other identical parts down with it too due to them all having the exact same properties.
Im just wondering how i would be able to do this without manually creating functionality for 700+ instances.
If someone has an idea of how i would be able to do this and requires a snippet of my code, just ask and ill pastebin it.
Thanks
Solution will most likely be found by using the collection service with tags.
Will update if i cant work it out.