2D ParticleEmitter

Hey there!

This is the first time I’m doing this so sorry if you don’t think this is good enough but…
I wanted to share with you a ModuleScript that I’ve created which allows you to easily generate 2D particles in ScreenGui. This ModuleScript is really useful for those who want to make their own 2D game with visual effects!

The ModuleScript works by creating a certain amount of Frames depending on how many particles you want to be emitted, it then updates their position in a continuous loop until their Lifetime has ended.

To use this script, you have to create a LocalScript and then set what Frame the particles should be emitted from.
You can also change the particle’s size, lifetime, speed, and also change its Image ID!
I recommend you to not have the ParticleCount higher than 500 since it could cause lag.

ModuleScript Link:

This is the code for using the ModuleScript:

local ParticleEmitter = require(script.Parent.ParticleEmitterModule)
local Frame = script.Parent:FindFirstChild("Frame") --Replace it with the Frame you want the particles to emit from

--[[Settings]]--
local ParticleCount = 100  --The amount of particles that will be emitted
local ParticleSize = 25    --The size of the particles
local ParticleLifetime = 5 --Lifetime of the particles
local ParticleSpeed = 10   --How fast the particles should move
local ParticleImageID = "rbxasset://textures/particles/sparkles_main.dds" --Replace it with the 

ParticleEmitter.EmitParticles(Frame, ParticleCount, ParticleSize, ParticleLifetime, ParticleSpeed, ParticleImageID)

Setup:

  • Place the ModuleScript inside your ScreenGui
  • Create a LocalScript and paste the code I listed above
  • And you’re good to go!

This is the code in action, sorry my recording software isn’t good

I hope you find this ModuleScript useful! Let me know if you have any questions or suggestions for improvements.

9 Likes

Are you going to implement the propertues of a normal ParticleEmitter?

1 Like

Do you mean like TimeScale, Acceleration, etc? If so, I think I may implement that.

1 Like