|
I'm curious because I'm using a script that turns all children(Parts only)'s transparency to 1. So there some sort of FindAllChildren function or do I have to do it manually? |
|
merger3Join Date: 2008-11-09 Post Count: 151 |
you probley could use :getchilderen()...... |
|
|
GetChildren() returns a table containing all objects inside the object the method is called on |
|
tesetingJoin Date: 2008-09-15 Post Count: 2535 |
:GetChildren() will return a table of all the children.
So, you will need a for loop to find all the children.
table = whatever:GetChildren()
for i = 1,#table do
table[i].Transpaarency =1
end |
|
somemanJoin Date: 2008-03-10 Post Count: 1402 |
Do something with Classname. |
|
|
@teseting: This is better (I think so anyway)
for i,v in pairs(script.Parent:children()) do
if v:IsA("BasePart") then
v.Transparency = 1
end
end |
|
tesetingJoin Date: 2008-09-15 Post Count: 2535 |
Yeah, but that might be too advance to him. |
|
|
function GetAllChildren(root, array)
if not array then array = {} end
for i, v in pairs(root:getChildren()) do
array[#array + 1] = v
GetAllChildren(v, array)
end
return array
end
local set = GetAllChildren(workspace)
Recursive Win |
|
|
while true do
for i,v in pairs(game.Workspace:getChildren()) do
print(v.Name)
wait(2)
end
end |
|
daggerz77Join Date: 2010-05-10 Post Count: 63 |
ya wut dey said :3 |
|
VarpJoin Date: 2009-11-18 Post Count: 5333 |
You probably want B3tter's thing, but those are called descendants, not children. |
|
|
Just use what teseting said. Nice and easy. |
|