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!
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)