I'm trying to run this code every time the player respawns
-- This is what is executed when the player joins the game.
game.Players.PlayerAdded:Connect(function(player)
local particle1 = game.ReplicatedStorage.ParticleEmitter
local particle2 = game.ReplicatedStorage.ParticleEmitter2
local death = game.ReplicatedStorage.death
local theCharacter = workspace:WaitForChild(player.Name)
if theCharacter.Humanoid ~= nil then
particle1:Clone().Parent = theCharacter.Torso
particle1:Clone().Parent = theCharacter.Head
particle1:Clone().Parent = theCharacter["Left Arm"]
particle1:Clone().Parent = theCharacter["Right Arm"]
particle1:Clone().Parent = theCharacter["Left Leg"]
particle1:Clone().Parent = theCharacter["Right Leg"]
particle2:Clone().Parent = theCharacter.Torso
particle2:Clone().Parent = theCharacter.Head
particle2:Clone().Parent = theCharacter["Left Arm"]
particle2:Clone().Parent = theCharacter["Right Arm"]
particle2:Clone().Parent = theCharacter["Left Leg"]
particle2:Clone().Parent = theCharacter["Right Leg"]
death:Clone().Parent = theCharacter
end
end)
But I need to run this code again on the player that respawns. How would I do that?

5 comments
Thank you, it works very well. (upvoted :D)
-Stamp of goul approval-
Your so handsome @CPF2
^
This was very good