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:

game.Players.PlayerAdded:connect(function(plr)
    local plrName = plr.Name
    plr.CharacterAdded:connect(function(char)
        local plrTorso = char:WaitForChild("Torso")
        plrTorso:connect(function(Trail)
            local sTrail = Instance.new("ParticleEmitter")
            sTrail.Name = "TrailTest"
            sTrail.Parent = plrTorso
        end)
    end)
end)

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.

game.Players.PlayerAdded:connect(function(plr)
    local plrName = plr.Name
    plr.CharacterAdded:connect(function(char)
        local plrTorso = char:WaitForChild("Torso")
        local sTrail = Instance.new("ParticleEmitter")
        sTrail.Name = "TrailTest"
        sTrail.Parent = plrTorso
    end)
end)

0
Thanks! RGRage 45 — 8y
Ad

Answer this question