array<Instance> GetChildren ()
The below would print the name of all objects currently in Workspace when ran. In this example it's done using a for loop.
local children = workspace:GetChildren()
for i = 1, #children do
It is recommended, however, that you use a generic for loop, as seen below.
for index, child in pairs(workspace:GetChildren()) do