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

GetChildren() then teleport?

Asked by 9 years ago

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)
0
Looking at the code, I don't see the 'GetChildren' method anywhere. :P TheeDeathCaster 2368 — 9y

Answer this question