I have this script that is supposed to make the player disappear into ashes upon death, it makes the limbs black and fade away along with particles, I want them to all disappear and whatever all at once, but they just disappear and whatever one by one. How do I make them do the thing all at once?
script:
local Dissapear = function(char)
for _,i in pairs(char:GetChildren()) do
if i:IsA("BasePart") or i:IsA("Accessory") then
if i ~= "HumanoidRootPart" then
local Ash = AshParticleEmmitter:Clone()
Ash.Parent = i
if i:IsA("BasePart") then
i.Color = Color3.fromRGB(0,0,0)
TS:Create(i, TI, {Transparency = 1}):Play()
end
wait(1.3)
i:Destroy()
end
end
end
end
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function()
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:FindFirstChild("Humanoid")
hum.Died:connect(function()
PlayerDiedEvent:FireClient(plr)
Dissapear(char)
end)
end)
end)