Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

NumberSequences in Loops?

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

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.