I have tried multiple ways to make a particle trail system for the player when they touch the block, but unfortunately I have had no luck with making it. Can someone please help me make a particle trail system. It would be very helpful! (I was never really good at scripting in "Lua Script" anyway. I am still learning Info: These are ways that I tried to make a particle trail system, bu t they didn't 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)
Use a Touched Event...
Part = script.Parent Part.Touched:connect(function(hit) -- Use the touched event on a brick( hit refers to the part or brick that is hit by 'Part') if hit.Parent:FindFirstChild('Humanoid') then -- If there is a humanoid it is more likely to be a player local Player = game.Players:GetPlayerFromCharacter(hit.Parent) if Player ~= nil then -- checks to see if the model or Parent is actually a player local Particles = Instance.new('ParticleEmitter') -- Creates the PartleEmitter inside of the Torso Particles.Parent = hit.Parent.Torso end end end)
Remember to try and do your best to make a script before asking us to make one for you, because most of the time we will not make one from scratch.
Keep that in mind...
local Particles = script.Parent.ParticleEmitter --Defines the particles script.Parent.Touched:connect(function(hit) --TouchedEvent wait() --waits local ParticlesClone = Particles:Clone() --Clones the particles ParticlesClone.Parent = hit --puts the particles inside of the object that hit the part end) --closes the function --]] 'hit' basically represents that part that is 'hitting' the brick. You can also change the 'hit(s)' other properties: -- hit.Material = "Neon" -- hit.BrickColor = BrickColor.Random()
--Copy this code into a script located inside a part or brick.
Closed as Not Constructive by Goulstem, OldPalHappy, TheeDeathCaster, and GoldenPhysics
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?