Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to clone particles in your character?

This is a continuation to the fade script except it clones the particle in the head. Now i was wondering how to clone it all of the parts when a character dies.

local Particle = game:GetService("ServerStorage"):WaitForChild("Dust")

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
        char.Humanoid.Died:Connect(function()
		local Cloned = Particle:Clone()
		Cloned.Parent = game.Workspace:WaitForChild(player.Name).Head
		wait(1)
           	for _, v in pairs(char:GetDescendants()) do
               	if v:IsA("BasePart") then
                    spawn(function()
                        for i = 0,1,.01 do
                            v.Transparency = i
                            wait()
                        end
                    end)
                end
            end
        end)
    end)
end)

1 comment

0

cant u just do char.Head instead of game.Workspace:WaitForChild(player.Name).Head

1 answer

✓ Accepted answer

Hello! I see you want to place the particles effect on every part in the character, right? Well you forgot to place the particles in all parts, but you did get the transparency part right, heres the edited script to help you.

local Particle = game:GetService("ServerStorage"):WaitForChild("Dust")

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
        char.Humanoid.Died:Connect(function()
	--For loop through the character, and place cloned particles on them
        for _, v in pairs(char:GetDescendants()) do
                if v:IsA("BasePart") then
                    local Cloned = Particle:Clone()
                   Cloned.Parent = v
                end
            end
        wait(1)
            for _, v in pairs(char:GetDescendants()) do
                if v:IsA("BasePart") then
                    spawn(function()
                        for i = 0,1,.01 do
                            v.Transparency = i
                            wait()
                        end
                    end)
                end
            end
        end)
    end)
end)

I forgot to fix a little part of the script, i edited for you, so this should work if the last one didnt.

This discussion is preserved as it was. New answers, comments, and votes are closed.