Engine Class
Fire
Summary
Properties
Code Samples
Lighting Torches
local Workspace = game:GetService("Workspace")
for _, descendant in Workspace:GetDescendants() do
if descendant.Name == "Torch" and descendant:IsA("BasePart") then
local fire = Instance.new("Fire")
fire.Heat = 10
fire.SecondaryColor = Color3.new(1, 1, 1)
fire.Size = math.max(descendant.Size.X, descendant.Size.Z) -- Pick the larger of the two dimensions
fire.Parent = descendant
end
endToggle Fire Effect
local part = script.Parent
local clickDetector = Instance.new("ClickDetector")
clickDetector.Parent = part
local fire = Instance.new("Fire")
fire.Parent = part
local light = Instance.new("PointLight")
light.Parent = part
local function onClick()
fire.Enabled = not fire.Enabled
light.Enabled = fire.Enabled
end
clickDetector.MouseClick:Connect(onClick)API Reference
Properties
size