|
| 03 Jun 2012 01:51 AM |
Would this be possible. You know :BreakJoints() Is it possible to make a custom method? So not a function but a method. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 02:31 AM |
Only possible way I know of is to tag a Variable to the method name, then add the parameters, like so
fort = Clone game.Workspace.Part:fort()
That would be a way to change the method name, but that is all you can do i think. |
|
|
| Report Abuse |
|
|
| |
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 04 Jun 2012 12:56 PM |
Do you mean like
function BreakJoints(model) if model:IsA("Model") then model:BreakJoints() end end
BreakJoints(game.Workspace.rangersmah)
I always forget which are functions and which are methods, and what not, so sorry if that's completely wrong ;_) |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2012 03:15 AM |
Rofl you are calling a function to call a method.
A method is like person:BreakJoints() with the colons and () A function is like
function hello() print("hello") end |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2012 03:23 AM |
So like?
function Lolwus(a) game.Workspace.tehepicford:a() end
Lolwus(Clone) |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 05 Jun 2012 03:23 AM |
You can't do that to objects that already exist, but you can do like
bob = { explode = function() end }
bob:explode() |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Jun 2012 03:30 AM |
You cannot create your own methods? Also what uses to newProxy have? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 05 Jun 2012 03:37 AM |
| You can create your own methods for your own tablesssssss. |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2012 03:38 AM |
Oh, If I think I know what you are talking about! But you can't make your own method. You can get something very close though.
function Explode(a) H = Instance.new("Explosion", game..Workspace[a]) H.Position = game.Workspace[a].Position end
Explode(tehepicford.Torso)
Thats probably the closest you could get.
|
|
|
| Report Abuse |
|
|
|
| 05 Jun 2012 03:39 AM |
| Lol late post :P Use Su8's idea. |
|
|
| Report Abuse |
|
|
|
| 05 Jun 2012 03:52 AM |
lol why did i come onto this fourm if theres no need to suggest.
Just saying. |
|
|
| Report Abuse |
|
|