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 10 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 10 years ago
local GetWorkspace = game:GetChildren() --Get al children.
local GetItemsInWorkspace = game.Workspace:getChildren() --Get all children.
for I = 1, #GetWorkspace do
print(GetWorkspace[I]) --Prints children on output.
end
for I = 1, #GetItemsInWorkspace do
print(GetItemsInWorkspace[I]) -- Prints children on output.
end
Ad

Answer this question