For context, the model is a vehicle. An explosion can damage it but it will still work. I've included a non-collidable part in the vehicle so when it blows up, the part will fall and get destroyed by the void. I want the vehicle to stop working after it gets damaged, so I tried coming up with a system that detects if the part has been destroyed which will disable the vehicle. I tried doing if (part) == nil then (vehicle stops working), but that doesn't work. I looked through similar questions from the past and read through the wiki, but I still can't find a solution. I don't need help with the disabling of the vehicle, I just need help with finding a way of detecting if a part still exists.
if Model:FindFirstChild("PartYourLookingFor") then --Dostuff end
model = script.Parent partToRemove = model:FindFirstChild "PART_NAME_HERE" model.ChildRemoved:Connect (function (p) if p == partToRemove then print (p.Name .. " was removed!") end end)