Properties | Details |
---|---|
Texture | Determines the image rendered on particles. This is crucial for defining the visual appearance of each particle. |
Color | Controls the color of particles over their lifetime, supporting smooth transitions between colors. |
Transparency | Sets how transparent particles are throughout their lifetime, allowing for fading effects. |
Size | Specifies the size of the particles over their lifetime. This can vary dynamically, enabling growth or shrinkage effects. |
Lifetime | Defines the duration each particle exists before automatically being removed. |
Rate | Determines the number of particles emitted per second. |
Speed | Controls the initial velocity of particles upon emission. |
Rotation | Specifies the rotation of particles in degrees, which can vary over time. |
Direction | Sets the initial direction in which particles are emitted, in degrees. |
SpreadAngle | Defines the randomness of the direction from the specified direction, allowing for a spread of particles. |
VelocityInheritance | Particles can inherit a percentage of the emitter’s velocity at the time of emission. |
EmissionDirection | The general direction in which particles are emitted, relative to the emitter’s orientation. |
Drag | Determines how quickly particles slow down, simulating air resistance. |
Acceleration | Applies constant acceleration to particles, useful for effects like gravity. |
LightEmission | Determines how much particles emit light or glow, enhancing their visibility against different backgrounds. |
LightInfluence | Specifies how much environmental light affects particles, influencing how particles blend with their surroundings. |
LockedToPart | When set, particles will move with the emitter if it is parented to a moving object. |
ZOffset | Adjusts the rendering order of particles relative to other objects in the world, without changing their actual position. |
local part = script.Parent
-- Create a ParticleEmitter
local particleEmitter = Instance.new("ParticleEmitter")
-- Set properties of the ParticleEmitter
particleEmitter.Parent = part -- Attach the emitter to the part
particleEmitter.Texture = "rbxassetid://83139619689306" -- Set a texture ID for the particles
particleEmitter.Rate = 50 -- Particles per second
particleEmitter.Lifetime = NumberRange.new(1, 2) -- Life time of particles in seconds
particleEmitter.Speed = NumberRange.new(10, 20) -- Speed range of particles
particleEmitter.SpreadAngle = Vector2.new(360, 360) -- Spread angle to emit particles in all directions
-- Optionally, customize other properties like Color, Size, Transparency, etc.
particleEmitter.Color = ColorSequence.new(Color3.fromRGB(255, 255, 0), Color3.fromRGB(255, 150, 0)) -- Yellow to orange gradient
particleEmitter.Size = NumberSequence.new(0.5, 1) -- Start and end sizes of particles
-- Enable/Disable the emitter programmatically
particleEmitter.Enabled = true -- Start emitting particles
If you found this tutorial helpful and would like to support my work, please consider buying me a coffee.
Thank you very much for your support!
Buy me a coffee