i am trying to put pets into my game but it keeps saying "attempt to index nil with 'Destroy'"
the whole lines are game.ReplicatedStorage.Remotes.UnequipPet.OnServerEvent:Connect(function(player, pet) if player.Character.Humanoid.Health ~= 0 then player.Character:FindFirstChild(pet):Destroy() end end)

1 comment
the first one just kills me and other one doesn't work