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

Is it possible to make a for i loop for particle transparency?

For some reason the transparency doesn't transition.

for i = 0,1,.05 do
	Particle.Transparency = NumberSequence.new(i)
	wait()
end

2 answers

##Problems

  • Your script adds up by .05 really fast, and stops at 1. This will make the transparency seem instant as the loop only has to add up 2 times in like half or less a second.

  • Although I don’t know NumberSequence that much, I really don’t think it’s necessary for something like this.

##Solutions

  • Make the third value in the for loop a small value (Ex: .01) or just make the wait a bit longer. You could do both.

  • Simply change “NumberSequence.new(i)” into “i”.

This is what it should look like :

for i = 0,1,.01 do
    Particle.Transparency = i
    wait()
end

If you want to adjust how fast or slow the loop goes, simply just mess around with the third value in the loop and the wait value.

5 comments

0

NumberSequence is how it works for particles.

0

Try it in studio

0

^ Haven’t tested it, but I checked the wiki and it said Transparency was a NumberSequence value, so I guess you can use that if it works.

0

How do you do bullet points on these answers?

Why not just do this?

for i = 1, 10 do
	Particle.Transparency = Particle.Transparency + 0.1
	wait(0.1) -- Or 0.01 for even smoother..?
end
-- "+" to make it more transparent
-- "-" to make it more visible

3 comments

0

Yes but because there is no number inbetween wait() This will seem instant.

0

I've tried that before. It doesn't work.

0

But what about just adding 0.1 between the ()? Or for even smoother 0.01?

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