TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 08 Jun 2015 02:59 PM |
How would I go about doing this?
function fchild(x) return :FindFirstChild(x) end
script.Parent:fchild("Part") |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 08 Jun 2015 03:00 PM |
You need to use a wrapper. Someone who knows more can explain
|
|
|
| Report Abuse |
|
|
|
| 08 Jun 2015 03:03 PM |
I have no idea about wrappers but here is what I would do
local function fchild(parent,child) return parent:FindFirstChild(child) end |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 08 Jun 2015 03:05 PM |
fishguy that is more or less annoying to switch the lines as i would love to just fimply write
local part = game.Workspace:FChild("Part")
instead of
local part = FChild(game.Workspace,"Part")
...i mean i know they basically are the same length but.. |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 08 Jun 2015 03:05 PM |
amanda h8s all
u hab bettr luk asking 4 isaac newt()n |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 08 Jun 2015 03:13 PM |
im 2 nub to do this
i think that cnt knows
|
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 08 Jun 2015 03:18 PM |
wot r u trying 2 do exaktly, make ur 0wn version O' FindFirstChild?
function fchild(p, x) return p:FindFirstChild(x) end print(fchild(workspace, 'Part')) |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 08 Jun 2015 03:24 PM |
| He's trying to add more functions to an object. rappers |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 08 Jun 2015 03:25 PM |
like I said before, I don't want to do
local part = FChild(parent,object)
I want to do
local part = game.Workspace:FChild(object)
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 08 Jun 2015 03:32 PM |
Wrappers are pretty complicated. You might not be able to wrap your head around it.
hahahaha |
|
|
| Report Abuse |
|
|
Brickagon
|
  |
| Joined: 01 Jun 2015 |
| Total Posts: 366 |
|
|
| 08 Jun 2015 03:33 PM |
"Wrappers are pretty complicated. You might not be able to wrap your head around it."
aaahahahaaah you're soo funny |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 08 Jun 2015 03:36 PM |
| Is there a wiki page on some reference to explain wrappers being used on roblox? |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2015 03:39 PM |
| Me and eLunate have wrappers for this >:D |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 08 Jun 2015 03:40 PM |
| @Jardo, in fact I looped at your wrapper module. I still have no idea on how I would use that with :FindFirstChild(), any explanation on doing this? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 08 Jun 2015 03:47 PM |
I can't believe none of you mentioned me.
Also Jarod your wrapper is fairly primative compared to my newer architechtures sorry for stepping up the game.
I have my old-old-old wrapper in my models, and my old Valkyrie wrapper on my c9. Either will work, but be warned both of them have different architechtures |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 08 Jun 2015 04:08 PM |
| okay so youre basically saying that I will have to use a wrapper and can't just somehow create my own variable to substitute an operator like :FindFirstChild()?...funny thing is that there is no example in your wrapper eLunate. Why provide any advanced code without any examples? cnt was kind enough to provide an example in his wrapper...still don't understand how i would use any of that to use for :FindFirstChild() or any other operator for that instance. |
|
|
| Report Abuse |
|
|
EgoMoose
|
  |
| Joined: 04 Feb 2009 |
| Total Posts: 2896 |
|
|
| 08 Jun 2015 04:11 PM |
This should do what you need.
http://www.roblox.com/Custom-Hierarchy-Read-README-item?id=152127761 |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 08 Jun 2015 04:17 PM |
I provide advanced code for advanced uses on an as-is basis. The old-old-old wrapper is not meant to be messed with unless you understand the code. The old Valkyrie wrapper was given without documentation as it is no longer in use by me and unneeded. I don't provide documentation or examples for dumped code, which is not a funny thing at all. If you need to use the old Valkyrie wrapper, then you should make a proxy environment that goes through the wrapper on index. Don't forget to add the Overrides table to the environment.
Alternatively, start developing using the current Valkyroe wrapper spec which does in fact have a documentation. |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 08 Jun 2015 04:33 PM |
@Ego, in a way I guess that is what I need but let me make this a broader idea. I want to be able to make custom variables for all kinds of Class functions.
http://wiki.roblox.com/index.php?title=Category:Class_functions
This is because I would love to make my own simplified module so I can simply code a bit faster.
function kill(x) return :BreakJoints(x) end
Are wrappers my only way to do this?
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|