I want to do something like this:
game:DeleteSomeObject( workspace.Part )
I was wanting to know if this is possible or not if so it would be helpful for me. I would like to say yes I know how to destroy a part this is just a example
I want to do something like this:
game:DeleteSomeObject( workspace.Part )
I was wanting to know if this is possible or not if so it would be helpful for me. I would like to say yes I know how to destroy a part this is just a example
there is no built-in way to actually add methods to an instance, but you can use instance wrapping to fake adding methods to an instance
although, instance wrapping is kind of hacky, and wrapped instances can't be accessed in other scripts unless you make something (e.g. a module) that manages them
you can find a pretty detailed tutorial on it here https://devforum.roblox.com/t/wrapping-with-metatables-or-how-to-alter-the-functionality-of-roblox-objects-without-touching-them/221611
note that you'll need at least a somewhat decent understanding of metatables to use wrapped instances
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
partname:Destroy()
Maybe with the use of OOP?