I need to make sure that when the button is pressed, a pet is issued, but the pet is not displayed but gives an error:attempt to index nil with 'WaitForChild' My script:
script.Parent.MouseButton1Click:Connect(function(Player)
local PetInv = Player:WaitForChild("Pets")
PetInv:WaitForChild(1).Value = PetInv:WaitForChild(1).Value +1
end)
Please, help!

2 comments
I updated my answer.
Now I write that I have 1 pet out of 40 but it is not visible in the inventory