#Prevent clothing from being deleted when humanoid is deleted

1 messages · Page 1 of 1 (latest)

cursive terrace
#

I'm trying to create an afterimages script, but whenever I delete the humanoid, the classic clothing also gets deleted. I've tried a version where the humanoid stays, but for some reason it collides with the player which I don't want, which i found out is because only the head of the clone gets its CanCollide turned off? why isnt every part turning it off?

local function createAfterimage()
    local clone = character:Clone()
    clone.Humanoid:Destroy()
    clone.HumanoidRootPart:Destroy()
    for _, part in clone:GetDescendants() do
        if part:IsA("BasePart") then
            part.Transparency = 0.2
            part.CanCollide = false
            part.Anchored = true
            part.CastShadow = false
            game.TweenService:Create(part,TweenInfo.new(AfterimageDuration),{Transparency = 1}):Play()
        elseif part:IsA("Decal") then
            part.Transparency = 0.2
            game.TweenService:Create(part,TweenInfo.new(AfterimageDuration),{Transparency = 1}):Play()
        end
    end
    task.wait(0.05)
    clone.Parent = workspace
    task.wait(AfterimageDuration)
    clone:Destroy()
end
#

Case 1: humanoid is deleted - clothing is removed but no collision issues
Case 2: humanoid is not deleted - clothing stays but the player is constantly sent jittering upwards

sinful jasper
#

try not deleting humanoid and using collision groups
(somewhy torso's CanCollide is still ON)

half pendant
#

are we deadass'

#

these dues dont have humanoid inside

split zephyr