You know how you can make parts transparent with a for i loop? Is there a way to do the same with ParticleEmitters? I tried
for i = 1, 20 do PE.Transparency = NumberSequence.new(0.2,0.5) wait() end
and other things like that. Any suggestions?
That is quite a simple method you can do. You could do this just as simple:
for i = 0, 1, .1 do PE.Transparency = i wait() end
I'll give some background into the code. "i" will represent the starting point of the transparency which will be 0. The number 1 will represent the desired number you would like to reach. Then .1 will represent the number increment so each time it will go up by .1. As an example: .1, .2 ,.3, .4, .5, .6, .7, .8, .9, 1 and stops at 1.
ParticleEmitters and Trails both take NumberSequences for Transparency.
Looking at RobloxDev on NumberSequences:
NumberSequence.new ( number n )
Using this we can count up towards 1 until the particle emitter is completely invisible.
local PE = script.Parent:WaitForChild("ParticleEmitter") for i = 0, 1, .05 do PE.Transparency = NumberSequence.new(i) wait() end
This loops from 0 to 1 with an increment of .05 every 1/30 a second.