generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: function help

Previous Thread :: Next Thread 
TimeTicks is not online. 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 is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Jun 2015 03:00 PM
or is this even possible?
Report Abuse
rayk999 is not online. 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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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 is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Jun 2015 03:03 PM
amanda help please?
Report Abuse
TimeTicks is not online. 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 is not online. 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 is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Jun 2015 03:12 PM
b
Report Abuse
rayk999 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Jun 2015 03:30 PM
anyone?
Report Abuse
rayk999 is not online. 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 is not online. 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 is not online. 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
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Jun 2015 03:39 PM
Me and eLunate have wrappers for this >:D
Report Abuse
TimeTicks is not online. 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 is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Jun 2015 03:40 PM
looked*
Report Abuse
eLunate is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
08 Jun 2015 04:48 PM
final bump?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image