Reference API Roblox

Engine API

Website

Related

Reference API Roblox

Fire

A particle emitter with the visual aesthetic of fire.

Member index 11

HistoryMember
553Color: Color3
553Enabled: bool
553Heat: float
553SecondaryColor: Color3
553Size: float
553TimeScale: float
553size: float
573FastForward(numFrames: int): null
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

Fire is one of several premade particle-emitting classes. Like other particle emitting objects, a Fire emits particles when parented to a BasePart an Attachment and while Enabled. This object is useful to create a quick visual effect in a pinch; for more detailed work it is preferable to use a ParticleEmitter instead.

Fire particles emit from the center of BasePart to which they are parented. The particles are emit toward the top (+Y) direction; however, a negative Fire.Heat may be used to emit in the bottom (-Y) direction. Using an Attachment as a Parent instead allows the emission position/direction to be modified by changing the Attachment.CFrame or related properties.

When Enabled is off, existing particles continue to render until they expire. However, if the Fire's Parent is set to nil all existing particles immediately disappear, similar to the behavior of ParticleEmitter:Clear(). It is possible to set the Parent to nil and back to the exact original object to achieve the same effect. If immediate disappearance is not desired, try moving the Fire's parent to some far away position, then Destroy the Fire after a few seconds using Debris:AddItem(). This will give the existing particles time to expire.

Fire objects emit no light on their own. To help create a cohesive environment around a burning object, try adding a PointLight with an orange Color. This can help your fire appear more realistic.

Fire object consist of two emitters. Both of these are affected in various ways by the Fire's Size, Heat, Color and SecondaryColor. The particles emit from the smaller, secondary emitter have a significantly longer lifetime (and rise farther) than those emit by the primary emitter. In the video to the right, you can see the two emitters with the distinct colors.

Unlike actual flames, the Fire object does not spread on its own. If you notice this behavior in your game, it is happening because of a Script.

History 33

Members 11

Color

TypeDefault
Color30.92549, 0.545098, 0.27451

The Color property determines the color of the larger particles emit by a Fire object. It is essentially the color of the outer portion of the flame.

In general, the cooler flames are on the outside of a fire. Therefore, fire looks more realistic if the outer portions are red or orange-yellow. A fire that is bright all throughout doesn't look very realistic, so avoid setting this property to yellow. Try adding a PointLight with the PointLight.Color as a sibling to the Fire. This will provide light to the surrounding environment and make it feel more cohesive with the flame particles.

History 4

  • 553 Change Default of Color from to Color3(0.92549, 0.545098, 0.27451)
  • 486 Change ThreadSafety of Color from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of Color from to ReadOnly
  • 47 Add Color

Enabled

TypeDefault
booltrue

The Enabled property, much like ParticleEmitter.Enabled, determines whether flame particles are emit. Any particles already emit will continue to render until their lifetime expires. This property is useful for keeping pre-made fire effects off until they are needed later. Since flame particles are destroyed when the Fire object's Instance.Parent is set to nil, this property is useful in allowing existing particles the opportunity to expire before destroying the Fire object altogether. See the function below.

local Debris = game:GetService("Debris")
local part = script.Parent
function douseFlames(fire)
	fire.Enabled = false -- No more new particles
	Debris:AddItem(fire, 2) -- Remove the object after a delay (after existing particles have expired)
end
douseFlames(part.Fire)

History 4

FastForward

Parameters (1)
numFramesint
Returns (1)
null

History 2

Heat

TypeDefault
float9

The Heat property determines how fast particles are emit from the Fire object. It is limited to the range [-25, 25]. Positive values are in the top (+Y) direction of the parent BasePart or Attachment. It also affects the ParticleEmitter.Acceleration of the inner particles. Below, you can see the effects of higher heat on the velocity/acceleration of the flame particles (left has Heat = 9, right has Heat = 18).

This property is not replicated. Its interface does not cross the network boundary.

History 4

  • 553 Change Default of Heat from to 9
  • 486 Change ThreadSafety of Heat from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of Heat from to ReadOnly
  • 47 Add Heat
Tags: [NotReplicated]

SecondaryColor

TypeDefault
Color30.545098, 0.313726, 0.215686

The SecondaryColor property determines the color of the smaller particles emit by a Fire object. It is essentially the color of the inner portion of the flame. Below, you can see the SecondaryColor of the flame is set to white to differentiate with the larger, outer particles which have Fire.Color set to blue. It should be noted that the inner particles use a ParticleEmitter.LightEmission of 1, so darker colors will instead cause the particles to appear transparent (and therefore black will stop rendering inner particles altogether).

History 4

Size

TypeDefault
float5

This property determines the size of the flame particles. It must be in the range of 2 to 30. Unlike ParticleEmitter.Size, the actual size of the flames will not match 1:1 with the equivalent size in studs; it is somewhat smaller.

To make your environment more cohesive, try adding a PointLight as a sibling to the Fire object. Set the PointLight.Brightness and PointLight.Range proportional to this property so that larger flames produce more light.

This property is not replicated. Its interface does not cross the network boundary.

History 4

  • 553 Change Default of Size from to 5
  • 486 Change ThreadSafety of Size from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of Size from to ReadOnly
  • 47 Add Size
Tags: [NotReplicated]

TimeScale

TypeDefault
float1

A value between 0-1 than controls the speed of the particle effect. At 1 it runs at normal speed, at 0.5 it runs at half speed, and at 0 it freezes time.

History 2

size

TypeDefault
float5
This property is deprecated. It exists only for backward compatibility, and should not be used for new work. Size should be used instead.
This property is not replicated. Its interface does not cross the network boundary.

History 5

  • 553 Change Default of size from to 5
  • 553 Change PreferredDescriptor of size from to Size
  • 486 Change ThreadSafety of size from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of size from to ReadOnly
  • 61 Add size
Tags: [NotReplicated, Deprecated]

Settings