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

Enabled

bool

Sets the visibility of the VFXPreset.

Code Samples

local VFXPreset = script.Parent

VFXPreset.Enabled = true
wait(3)
VFXPreset.Enabled = false

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)

Size

number

You can set the size of the VFXPreset.

Code Samples

local VFXPreset = script.Parent

VFXPreset.Size = 2

Transparency

number

You can set the transparency of the VFXPreset.

Code Samples

local VFXPreset = script.Parent

VFXPreset.Transparency = 0.5

Methods

Events

See also

VFX

Last updated