I am making a good gun engine and decided to switch from basically having 3 bullet models and switch between each being transparent to make a easy bullet drop animation
but for some variety I started using a particle,
I found the rate I needed and everything worked until I noticed that sometimes on the 2nd 3rd and 4th shots multiple bullets will eject instead of 1
Script I use for it:
script.Parent.B1.Transparency = 0
script.Parent.Hole.SpotLight.Enabled = true
script.Parent.Hole.Smoke.Enabled = true
script.Parent.Hole.Fire.Enabled = true
script.Parent.Hole.Wind.Enabled = true
script.Parent.Bolt2.Transparency = 0
script.Parent.Bolt.Transparency = 1
wait(.05)
script.Parent.B2.Transparency = 0
script.Parent.B1.Transparency = 1
script.Parent.Bolt3.Transparency = 0
script.Parent.Bolt2.Transparency = 1
script.Parent.BulletEject.Shell.Enabled = true --Makes the particle get enabled so that it can eject --from it
wait(.05)
script.Parent.BulletEject.Shell.Enabled = false --Stops it from being enabled
script.Parent.B2.Transparency = 1
script.Parent.Bolt3.Transparency = 1
script.Parent.Bolt4.Transparency = 0
script.Parent.Bolt.Transparency = 0
script.Parent.Hole.Wind.Enabled = false
script.Parent.Hole.Fire.Enabled = false
script.Parent.Hole.Smoke.Enabled = false
script.Parent.Hole.SpotLight.Enabled = false
wait(.02)
script.Parent.Bolt4.Transparency = 1
script.Parent.B1.Transparency = 1
script.Parent.B2.Transparency = 1
script.Parent.B3.Transparency = 1
script.Parent.Handle.BDROP:Play()
the particles rate that im using is 21
but even stranger, I can sometimes change it by .1s so its not exact somehow
Video proof:
A Couple years later, I can say for sure I know how to fix this without pretending it works,
use emit(1) on the particle
I was a idiot for not doing that