This script to make a bullet trail from a given position to another end position works on the first shot but doesn’t show the trail when multiple instances of the bullet trail part are present in the gun. The bullet trail itself is just a part with a trail instance inside of it.
function EffectModule.BulletTrail(part, start, finish)
local BulletTrail = ReplicatedStorage.Effects:FindFirstChild("TrailEffect"):Clone()
BulletTrail.Parent = part
Debris:AddItem(BulletTrail, BulletTrail:GetAttribute("LifeTime"))
BulletTrail.Position = start
RunService.Stepped:Wait()
BulletTrail.Position = finish
end
what is the part that its being parented to also is it being remove locally at some point or destroyed? it maybe its being removed but still declared in your variables is why there is not an error
the part is just where the muzzle is. I parented it there because that’s also where I put my muzzle flash. It is only removed if the tool is unequipped
correction: the trail takes one frame to get to the hit position. This function is called in another function that shoots the gun at a specific firerate
Just not sure how you make “part” that is passed in. If you clone some bullet part each time, you would want to assign the attachments from the new clone.
you should tween the positions just setting it to new position doesn’t move it and probably doesn’t render the trail correctly try tweening it which i would do or movers
also if you remove it to fast it may not render
I have tested this and the issue is with the wait you are using it is to fast for the render because you are just setting the position to the new one