I have a pet system, and when i try to unequip the pet everything works just fine, the text changes to unequip, but i get an error in the output saying "Main.87 attempt to index nil with 'Destroy'" and it doesnt unequip the pet. I dont know how to fix this pls helppp
game.ReplicatedStorage.Remotes.UnequipPet.OnServerEvent:Connect(function(player, pet) if player.Character.Humanoid.Health ~= 0 then player. Character:FindFirstChild(pet):Destroy() end end)

2 comments
Can you post your script. we have almost nothing to work from. Ideally in/around line 87, the part where if breaks at. Then we can help you
TGazza i did that