Alright, so I'm trying to make something happen when a Child is Added inside the Humanoid.Problem is that, that exact child will have some children of it's own, and I can't access them with the ChildAdded event.Any ideea how I might be able to do that? Here's a part of the script so you might get what I want to say if you haven't already:
humanoid.ChildAdded:Connect(function(WhatWasAdded) if WhatWasAdded:IsA("IntValue") then for i, v in pairs(WhatWasAdded:GetChildren()) do--Trying to access the children of the child added in the humanoid print("Got in the for") end end end)
It doesn't print anything, and yes, it's a IntValue, and yes, I do have humanoid as a variable.The script's fine, the problem is I'm just given the Child that was Added, not it's Children aswell.
You can use DescendantAdded
event.
A child is both a child and descendant. So DescendantAdded
will fire for children too.
Descendants are indirect children. Children of children.
Additionally, there is :GetDescendants()
which behaves like :GetChildren()
but also gets descendants.