while true do script.Parent.ParticleEmitter.Acceleration = Vector3.new(0, 0, 0.4) wait(.5) script.Parent.ParticleEmitter.Acceleration = Vector3.new(0, 0, 0.8) end
I want to make a particle rock back and forth slowly but this doesn't seem to work.
Does anyone have a fix to this?
From your explanation I'm guessing you'd do-
script.Parent.ParticleEmitter.Acceleration = Vector3.new(0,0,0.4) while true do for i = 1,4 do -- Brings it to 0.8 script.Parent.ParticleEmitter.Acceleration = script.Parent.ParticleEmitter.Acceleration + Vector3.new(0,0,0.1) wait(.5) end wait() -- Any interval of time between for i = 1,4 do -- Brings it back to 0.4 script.Parent.ParticleEmitter.Acceleration = script.Parent.ParticleEmitter.Acceleration - Vector3.new(0,0,0.1) wait(.5) end end
What your doing is moving it one way by reversing that and making it go the opposite way , Using negatives it will rock back and forth pretty smoothly.
while true do script.Parent.ParticleEmitter.Acceleration = Vector3.new(0, 0, 0.4) wait(.5) script.Parent.ParticleEmitter.Acceleration = Vector3.new(0, 0, 0.8) wait(.5) script.Parent.ParticleEmitter.Acceleration = Vector3.new(0, 0, -0.4) wait(.5) script.Parent.ParticleEmitter.Acceleration = Vector3.new(0, 0, -0.8) wait(.5) end