GetChildren and multiple models

I am trying to make a thing where I can hide all pets.

I am trying to do like

local pet = workspace.PlayerPets:GetChildren()

how would I make it so like all children of pet become invisble?

for _, pet in pairs(workspace.PlayerPets:GetChildren()) do
	for i,v in pairs(pet:GetDescendants()) do
		pcall(function()
			v.Transparency = 1
		end)
	end
end
1 Like