Pretty much what I wanna do is be able to give a Part it's own function.
for example: workspace.Part:Nil()
or
workspace.Part:Boom()
Is there anyway I can attempt this? I've tried just doing this:
function Item:Nil() Item.Parent = nil end
(I didn't think that'd work but I tried)
This might not be possible. But if there is anyway to make a "metatable" for a part then maybe it is possible (doubt it) Thank you for the help. If you can't find any way to do it that's fine.
This isn't possible. Roblox doesn't allow us to customly bind functions to objects. If you were using a more open engine (f.i. Unity / Unreal Engine), you could implement those custom functions.
For your Objet:Nil() function, you should use:
function Nil(Object) if Object then Object = nil end end Nil(MyObject)
Or just the simple one line: Object:Destroy()
For your Object:Boom() function, you can make
function Boom(Object) if Object:IsA("BasePart") then Instance.new("Explosion",game.Workspace).Position = Object.Position end end Boom(MyObject)
This will create an explosion at the Position of MyObject.