local deb = false
script.Parent.Touched:connect(function(h)
if h.Parent:FindFirstChild("Humanoid") then
if deb == true then return end
deb = true
script.Parent.Sound4:Play()
local player = game.Players:GetPlayerFromCharacter(h.Parent)
if player.Character:FindFirstChild("Left Leg") or player.Character:FindFirstChild("Right Leg") then
if player.Character:FindFirstChild("Left Leg") then
player.Character["Left Leg"]:Destroy()
end
if player.Character:FindFirstChild("Right Leg") then
player.Character["Right Leg"]:Destroy()
end
elseif player.Character:FindFirstChild("Left Leg") ~= nil and player.Character:FindFirstChild("Right Leg") ~= nil then
player.Character.Torso:Destroy()
end
end
deb = false
end)
Touching this brick is supposed to destroy your legs, or if you don't have any, destroy your torso. It destroys your legs but the torso thing doesn't seem to work. Can't figure out what it might be.

2 comments
On line 16 you're checking if the left or right leg exists, when the point is that they don't exist. Instead you should just check if there is a torso and if there is, remove it.
I tried elseif player.Character:FindFirstChild("Torso") then / but that removes both the legs and the torso.