How do you even add/subtract the size of particles?

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

Already tested it and it doesn’t work :confused:

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

Works very well, thank you.

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