Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

NumberSequences in Loops?

Asked by 8 years ago

n1 = 1

for grow = 1,20 do part.Size = part.Size +Vector3.new(2,1,0)

    Water2.Size = NumberSequence.new(n1)

    wait(1/25)
end

I am trying to make it so that the particle emitter's size goes up. Can i get help plz

1 answer

Log in to vote
0
Answered by
Lamar 45
8 years ago

You want to either use your grow variable for the argument in your NumberSequence constructor instead of n1, or increase n1 every step of the loop. So, either put

n1 = n1 + 1

in the loop, or change NumberSequence.new(n1) to NumberSequence.new(grow). (That second option is easier and makes more sense in my opinion)

Since grow is increased every step in the loop, the size of the ParticleEmitter should also be increased. In the first step of the loop, grow is 1, so it'll increase by 1 every time. If you want to use a different value for the size, use n1 and apply whatever maths you need.

Ad

Answer this question