This is a serverscript inside Workspace. When I die, the particleemitter leaves, I know why, but I don't know how to fix it.
game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character local torso = player.Character:WaitForChild("Torso") local newParticle = game.ServerStorage.ParticleEmitter:Clone() newParticle.Parent = torso local Humanoid = player.Character.Humanoid Humanoid.HealthChanged:connect(function(NewHealth, player) if NewHealth < 25 then --Checks the new health of the humanoid. torso.ParticleEmitter.Enabled = true else torso.ParticleEmitter.Enabled = false end end) end)
Just do a Died
event on the character's humanoid. I added a LoadCharacter()
to make the character respawn instantly after death.
game.Players.PlayerAdded:connect(function(player) player.Character.Humanoid.Died:connect(function() char = player.Character char:LoadCharacter() char.Torso.ParticleEmitter.Enabled = true end) end)