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

What is the function that gets everything in workspace like :FindFirstChild?

Asked by 4 years ago
Edited 4 years ago

I am making a game where I want to make it so all the zombies get destroyed. Whats the function?

1
:GetChildren() Ziffixture 6913 — 4y
0
Thx FluffySheep46209 369 — 4y
0
or youtubemasterWOW 2741 — 4y
1
I love it when people notice the answer is already given in comments. Then either take it for credit or answer anyway Ziffixture 6913 — 4y

2 answers

Log in to vote
2
Answered by
JesseSong 3916 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

If your trying to get the first child use FindFirstChild if you want to get a table of things such as a player use :GetChildren()workspace Here's an example

workspace:GetChildren() -- this gets the whole service in the explorer like camera, terrain etc 
Ad
Log in to vote
0
Answered by
kom297 -4
4 years ago

its

workspace:GetChildren()
-- if you wanted to make a variable of the stuff you could do this
local workspaceStuff = workspace:GetChildren() --note that this is a table

Answer this question