Find Specific Item Inside Player Somewhere

Was going to bed but decided to ask this so i can work on it in the morning
I was wondering if there was some sort of way to get every single child of any item and then find a specified item in there.

example:

for i, child in pairs(parent:GetChildren()) do
if child:IsA('Accessory') then
	child:Destroy()
end

( this doesn’t find all the children of course only the ones under that specified parent )

well anyways if anybody replies i will reply back once im awake !

I guess you could use parent:GetDescendants() instead of GetChildren() that will give you a list of all instances inside your parent

yes somebody told me i could use this a bit ago somewhere else, thank you a lot!

1 Like