I am making a game that i want the ground to delete unanchored parts but i dont want humaniods to die. I made a script that deletes the parts but i deletes all parts humans, anchored parts, and unanchored parts.
This isn't tested and may be a bad way to do it, but i think this may help you
for i,v in pairs(Part:GetTouchingParts()) do if v.Anchored == false and not v.Parent:IsA("CharacterMesh") and not v:IsA("CharacterAppearance") then v:Destroy() end end