I am trying to detect all the Towns in the Street object, inside, that have child wind_.
But the loop terminates after processing a single Town object, why?
for _, object in ipairs(game.Workspace.Street: GetChildren()) do
if object.Name == "Town" then
for _, object in ipairs(object.house:children()) do
if string.sub(object.Name, 1, 5) == "wind_" then
object.BrickColor = BrickColor.new("Light blue")
end
end
end
end
As expected, the for loop goes through all Town objects.
New contributor
Nikassaiop End is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.