VFXPreset
VFXPreset : Instance
Overview
This instance lets you display common in-game effects such as fire, explosions, barriers, and recovery, by selecting from a set of predefined effects
Properties
Color
ColorSequence
You can set the color of the VFXPreset using a ColorSequence.\ Assign different colors to the start and end points of the ColorSequence to create a gradual color transition effect.
Code Samples
local VFXPreset = script.Parent
local Time1 = 0
local Time2 = 0.5
local ColorKeyPoints =
{
ColorSequenceKeypoint.new(Time1, Color3.fromRGB(255, 0, 0)),
ColorSequenceKeypoint.new(Time2, Color3.fromRGB(0, 0, 255))
}
VFXPreset.Color = ColorSequence.new(ColorKeyPoints)Enabled
boolean
Sets the visibility of the VFXPreset.
Code Samples
InfiniteLoop
boolean
Sets whether VFXPreset plays in an infinite loop.
If true, the set value of Loop Count is ignored and infinite loop supersedes.
Code Samples
LoopCount
number
Sets the number of VFXPreset loops.
This value is applied only if Infinite Loop is set to false.
Code Samples
PresetName
string
Specifies the name of the appearance preset to apply to the VFXPreset.
If an invalid or non-existent preset name is provided, the value is ignored and the current settings are preserved.
Code Samples
Size
number
You can set the size of the VFXPreset.
Code Samples
Transparency
number
You can set the transparency of the VFXPreset.
Code Samples
Methods
Clear
Resets the effect being rendered.
While the ParticleEmitter’s Clear removes particles, this method re-executes the effect.
Parameters
Return
void
Code Samples
Emit
Provides a function to create a specified number of particles at once.
Parameters
number ParticleCount
The number of particles to create.
Return
void
Code Samples
Events
See also
Last updated