This module aims to mimic the existing Roblox ParticleEmitter object to make it easier to create 2d particles and port over existing particle emitters (with a few tweaks of course!)
Short video of this module in action, along with a comparison:
Notable changes that you have to account for when making your own particle emitter:
Speed determines how much the particle progresses in pixels (offset) per second.
Size is in offset.
You can get and view the source code via Github or the Roblox Creator Store.
A quick usage example can be found within the Github provided above.
Replaced math.random with the Random class internally
Added .fromParticle constructor function which lets you create a 2d particle object using an existing particle emitter as a base
Example usage:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ParticleEmitter = require(ReplicatedStorage:WaitForChild("ParticleEmitter"))
-- Size & Speed are being set here because they work very differently
-- from regular ParticleEmitters
local sparklesEmitter = ParticleEmitter.fromParticle(script.ParticleEmitter)
sparklesEmitter.Size = NumberSequence.new({
NumberSequenceKeypoint.new(0, 3.75),
NumberSequenceKeypoint.new(0.175, 15),
NumberSequenceKeypoint.new(1, 0),
})
sparklesEmitter.Speed = 15
sparklesEmitter.Parent = script.Parent
Nope, it only took a few hours because I had to come up with ideas for these particles
Refer to the example given above or within the Github to get started