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: How can I make a recur script?

Previous Thread :: Next Thread 
Mr_Wiggles is not online. Mr_Wiggles
Joined: 08 Mar 2015
Total Posts: 257
05 Oct 2016 09:44 PM
Basically, check if something have children and check the children of their children and so on...


~Wiggles
Report Abuse
Mr_Wiggles is not online. Mr_Wiggles
Joined: 08 Mar 2015
Total Posts: 257
05 Oct 2016 09:48 PM
pls sirs


~Wiggles
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
05 Oct 2016 09:55 PM
check = function(name,location)
local objects = {}
for i,v in next, location:GetChildren() do
if v.Name == name then
objects[v] = true
end
check(name,v)
end
end

local objects = check('Part',workspace)

for part,val in next, objects do
print(part.Name)
end


Report Abuse
Weirdraidercs35 is not online. Weirdraidercs35
Joined: 14 May 2015
Total Posts: 2275
05 Oct 2016 10:08 PM
:findfirstchild(';p;',true)


im a mlg
Report Abuse
Mr_Wiggles is not online. Mr_Wiggles
Joined: 08 Mar 2015
Total Posts: 257
05 Oct 2016 10:09 PM
@Weird trying to get a class, not the name of an object


~Wiggles
Report Abuse
Weirdraidercs35 is not online. Weirdraidercs35
Joined: 14 May 2015
Total Posts: 2275
05 Oct 2016 11:05 PM
o


im a mlg
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
05 Oct 2016 11:25 PM
then is :IsA()


Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
06 Oct 2016 05:33 AM
use*


Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx
Report Abuse
CodeBreadpudding is not online. CodeBreadpudding
Joined: 24 Aug 2016
Total Posts: 1286
06 Oct 2016 07:53 AM
object.ClassName
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
06 Oct 2016 08:20 AM
@OP

check = function(Class,location)
local objects = {}
for i,v in next, location:GetChildren() do
if v:IsA(Class) then
objects[v] = true
end
check(name,v)
end
end

local objects = check('BasePart',workspace)

for part in next, objects do
print(part.Name)
end


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
06 Oct 2016 08:21 AM
change the 'check(name,v)' to check(Class,v) *

Yes all i did was literally change 1 thing to make it check for a specific class. Not that hard.


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