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

How does ParticleEmitter work in scripting?

The new ROBLOX ParticleEmitter was recently added to ROBLOX Studio but after experimenting with it I came up with a very big question, some properties of the ParticleEmitter for example Size use the Graph where you can put different values and "envelopes" but... how would you do this using a Script? I know there's NumberRange.new and NumberSequence.new but I don't know how the second one works, on NumberRange you insert two values Max and Min while in NumberSequence you're supposed to use many values but if I do for example NumberSequence.new(1, 5, 2) the first number will be the only one working.

Can someone help me with this? I've already tried many ways and since none of them worked I came here to see if someone can help me.

7 comments

0

That's a very good question. I'd like to know the answer to this as well.

0

You're kidding right? The API tells nothing about how can you set NumberSequence.new

0

In all honesty, to me, the 'ParticleEmitter' seems a bit, well, useless, and I fail to see the point of using it.

1

@Slazerick If you click on the data type "NumberSequence", you'll be prompted with this page: http://wiki.roblox.com/index.php?title=API:NumberSequence. It'll tell you some things you may need to know about this property (read the bug section, too).

0

@Slazerick Besides that, the only solution I can think of is preset the particle emitter object and place it in one of the storage intances. Then just clone it if you want to replicate it from a script.

0

I'm under the impression that Roblox is unfinished with these new property types.

1 answer

There's a simple answer to this: You cannot. The Scripting side of ParticleEmitter with the graphs wasn't thought through very well. My suggestion is to just constantly swap parts with ParticleEmitters if what you're trying to achieve with it isn't that advanced.

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