Hi I was testing out some code with getchildren and this script didn't seem to work. I have no idea why. Can you help?
local number = 0
local parent = game.Workspace.ZombiesAlive
parent.ChildAdded:connect(function( child )
if child:IsA("Model") then
number = number + 1
warn(child:GetFullName(), number)
end
end)
parent.ChildRemoved:connect(function( child )
if child:IsA("Model") then
number = number - 1
warn(number)
end
end)

1 comment
Looking at the code, I don't see the 'GetChildren' method anywhere. :P