Azrellie
(FxmboyStormie)
January 6, 2019, 1:43pm
#1
How do you even add/subtract to the size of particles with lua?
I have tried using something like this but this doesn’t work?
while true do
script.Parent.Size = script.Parent.Size + NumberSequence.new(1)
wait(0.1)
end
Can you even add/subtract to the sizes of ParticleEmitters
?
oh also im new here (first day)
3 Likes
if you know it only has one keypoint, then you can use script.Parent.Size = (script.Parent.Size.Keypoints[1] + 1)
(or something similar, i’ll have to test first.)
1 Like
Azrellie
(FxmboyStormie)
January 6, 2019, 1:48pm
#3
Already tested it and it doesn’t work
Also I have yet to figure out what adding ()
in code does yet (this for example (script.Parent.Size.Keypoints[1] + 1)
)
1 Like
found it!
local s = (part) s.Size = NumberSequence.new(s.Size.Keypoints[1].Value + 1)
(variable is named s because i used selectionservice to test)
4 Likes
You could achieve the same effect by just declaring a local variable and just adding one to it every time the loop runs.
Something like this should work:
local increment = 1
while true do
increment = increment + 1
workspace.Part.ParticleEmitter.Size = NumberSequence.new(increment)
wait(0.1)
end
5 Likes
Azrellie
(FxmboyStormie)
January 6, 2019, 1:52pm
#6
Works very well, thank you.
vsnry
(vsnry)
January 6, 2019, 2:58pm
#7
The best way of doing this would be:
while wait() do
workspace.Part.ParticleEmitter.Size = NumberSequence.new(workspace.Part.ParticleEmitter.Size.Keypoints[1].Value + 1)
end
4 Likes