Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I get every children like not only workspace?

Asked by 11 years ago

While I was making the storm physics script then I want every children even the models to blow away without they get declared because of this problem then I had to do this GetParent = game.Workspace,game.Workspace.Model

1 answer

Log in to vote
-1
Answered by 11 years ago
1local GetWorkspace = game:GetChildren() --Get al children.
2local GetItemsInWorkspace = game.Workspace:getChildren() --Get all children.
3for I = 1, #GetWorkspace do
4print(GetWorkspace[I]) --Prints children on output.
5end
6for I = 1, #GetItemsInWorkspace do
7print(GetItemsInWorkspace[I]) -- Prints children on output.
8end
Ad

Answer this question