Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a Particle Emitter that is placed in the character's torso when they enter the game?

Asked by
RGRage 45
8 years ago

I am trying to make a Particle Emitter trail script that adds a Particle Emitter to the character's torso when they enter the game, but my way of scripting it will not work.

This is what my script looks like:

01game.Players.PlayerAdded:connect(function(plr)
02    local plrName = plr.Name
03    plr.CharacterAdded:connect(function(char)
04        local plrTorso = char:WaitForChild("Torso")
05        plrTorso:connect(function(Trail)
06            local sTrail = Instance.new("ParticleEmitter")
07            sTrail.Name = "TrailTest"
08            sTrail.Parent = plrTorso
09        end)
10    end)
11end)

Can anyone help my with this, it will be vary much appreciated!

1 answer

Log in to vote
0
Answered by 8 years ago

You're really close! You don't have to connect anything with plrTorso since plrTorso is not an event. So we can just remove that and it should work.

1game.Players.PlayerAdded:connect(function(plr)
2    local plrName = plr.Name
3    plr.CharacterAdded:connect(function(char)
4        local plrTorso = char:WaitForChild("Torso")
5        local sTrail = Instance.new("ParticleEmitter")
6        sTrail.Name = "TrailTest"
7        sTrail.Parent = plrTorso
8    end)
9end)
0
Thanks! RGRage 45 — 8y
Ad

Answer this question