How would I make a loop that increases the speed of a particle emitter every second. I'm not familiar with user data errors and what they mean but I keep getting them with this one line of code.
repeat ParticleEmitter.Speed = ParticleEmitter.Speed + NumberRange.new(10, 10) wait(1) until nil
It's all one line by the way.
I had the same question for transparency.
for i = 1, 3 do ParticleEmitter.Speed = NumberSequence.new(i) wait(1) end
I don't know your particle emitter's starting speed, so change 1 to the starting speed of it, and 3 to the speed you want it to end it. If it doesn't work, comment the error, I came up with this on the spot. What does this is the speed increases to the number i, of the for loop, is. Every second that passes, with the numbers I put, the speed increases by 1 until it reaches a speed of 3.
Hello! As mentioned above, you could also do a for loop to limit the times it will go up.
for i = 1, 100, 5 do -- 1 Stands for what to start counting from, 100 stands for what to count up to, and 5 stands for how much to count with each time. ParticleEmitter.Speed = i end
~Waterfoox
I don't know, but I have a feeling you're overthinking this a little bit. If it was me, I would use a while true do loop, or if you want it to go for a set amount of times, you could do a simple for loop. Here's what I would do:
while wait(1) do -- Repeats everything between do, and end, waiting 1 second each time it finishes once. ParticleEmitter.Speed = ParticleEmitter.Speed + 10 -- Adds 10 to the speed every time it's ran. end
Hope that helps!