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: Line 16 - upvalue get

Previous Thread :: Next Thread 
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 01:32 PM
local function get(obj)
for i, v in pairs(obj:GetChildren()) do
table.insert(Descendants, v)
get(v)
end
end

I forgot how to look for Descendants properly :/

"My Life is going Good... but..."
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
12 Apr 2015 01:33 PM
Take away the local.


I script -~ chimmihc
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 01:36 PM
still same :P

"My Life is going Good... but..."
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
12 Apr 2015 01:38 PM
function get(obj)
local Descendants = {}
for i, v in pairs(obj:GetChildren()) do
table.insert(Descendants, v)
for ii,vv in pairs(get(v)) do
table.insert(Descendants, vv)
end
end
return Descendants
end
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 01:41 PM
war have u Tested this?

"My Life is going Good... but..."
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
12 Apr 2015 01:43 PM
Get all descendants?

local Get = function(par)
local all = {}
for _,v in next, par:GetChildren() do
table.insert(all,#all + 1,v)
recurse = function(p)
for _,v in next, p:GetChildren() do
table.insert(all,#all + 1,v)
recurse(v)
end
end
recurse(v)
end
return all
end

I script -~ chimmihc
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 01:47 PM
are u srs? o.O
all of the Attempts give the same Result!
if it rlly matters am using a Plugin...

"My Life is going Good... but..."
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
12 Apr 2015 01:49 PM
I have never made a plugin, that is probably effecting something. The script I gave works fine standard.


I script -~ chimmihc
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 01:51 PM
ah well...
I had 1 made with a while loop in it and it Worked with a Plugin...

btw, are u srs???
I made like 8 (some aren't the reall deal or watever, so cut it down to 4 maybe) and now is my 9th...

"My Life is going Good... but..."
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
12 Apr 2015 01:53 PM
I don't know how to make them :(

Following the instructions on the wiki led me to rage quitting learning them when everything the wiki said was wrong.


I script -~ chimmihc
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 01:55 PM
loool! XD

it's EASY! XD

local tb = plugin:CreateToolbar('Name')
local btn = tb:CreateButton(
'Press me';
'Do it Now!';
'asset link from Picture'
)
btn.Click:connect(function()
--do stuff
end)

"My Life is going Good... but..."
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
12 Apr 2015 01:56 PM
plugin errors because it's a nil value.


I script -~ chimmihc
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 01:58 PM
yeah in Command Bar or Normal Scripts XDDD
if in Command Bar then use PluginManager

"My Life is going Good... but..."
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
12 Apr 2015 02:00 PM
No I followed the instructions exactly with the disabled local script, errors still.


I script -~ chimmihc
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 02:02 PM
chim, PM me, I'll tell u EXACTLY how to do it XD

"My Life is going Good... but..."
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
12 Apr 2015 02:03 PM
plugin = PluginManager()
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 02:09 PM
lol...
btw, if u wanna know chim, I found out that u can make a Temporary Plugin from CrazyMan... from his Twitter XD

"My Life is going Good... but..."
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
12 Apr 2015 02:13 PM
local function GetDescendants(root, classes, tab)
local tab = tab or {}
for _, class in pairs(type(classes) == "string" and {classes or "Instance"} or classes or "Instance") do
for index, child in pairs(pcall(game.IsA, root, "Instance") and root:GetChildren() or {}) do
if ({pcall(game.IsA, child, class)})[2] == true then
tab[#tab + 1] = child
end
GetDescendants(child, class, tab)
end
end
return tab
end

Should work as a plugin and in regular scripts. The plugin should be able to fetch more objects since it has a higher security context.
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
12 Apr 2015 02:16 PM
Small fix:
local function GetDescendants(root, classes, tab)
local tab = tab or {}
for _, class in pairs(type(classes) == "string" and {classes or "Instance"} or classes or {"Instance"}) do
for index, child in pairs(pcall(game.IsA, root, "Instance") and root:GetChildren() or {}) do
if ({pcall(game.IsA, child, class)})[2] == true then
tab[#tab + 1] = child
end
GetDescendants(child, class, tab)
end
end
return tab
end
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 02:27 PM
em sry, but y all those Args???
I only need 1 for checking it... :/

"My Life is going Good... but..."
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
12 Apr 2015 02:34 PM
root
--// thing you want to search. I.e. game
classes
--// allows you to pass a table of classes i.e {"Part", "WedgePart", "Script"}
--// You can leave this as nil if you want all objects. You can just pass a string if you are looking for one object i.e. "ModuleScript"
tab
--// The table we store objects in, since I am using recursion and not using a global table I have to pass a reference to the table so that all the objects get stored in the same table.
--// When initially calling the function you can have it add to a table of your choosing or pass nothing (nil) and it will generate it's own table.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 02:37 PM
ah well, I got no other choice, no offence or anything, just don't like using un-necessary things in my Code :/

"My Life is going Good... but..."
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
12 Apr 2015 02:44 PM
The peripherals have little impact on performance, you you're free to boil it down to a more rudimentary form.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
12 Apr 2015 02:48 PM
lol I nearly thought u said 'Rudamentality' XD
which am looking at right now XD their Game...

"My Life is going Good... but..."
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