Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How can I change my fire color after I create it?

Asked by 1 year ago

I am making fire when I touch a part but I can't tell how to change the color of it.

local PlayersService = game:GetService("Players")

local debounce = false

script.Parent.Touched:Connect(function (hit)
    if hit and hit.Parent:FindFirstChild("Humanoid") and PlayersService:GetPlayerFromCharacter(hit.Parent) and debounce == false then
        local fire = Instance.new("Fire")
        fire.Parent = script.Parent
        debounce = true
        wait(1)
        debounce = false
    end
end)

2 answers

Log in to vote
1
Answered by
bbissell 346 Moderation Voter
1 year ago
Edited 1 year ago

Once you create the fire, you can set any of it's properties (including color) like this:

local fire = Instance.new("Fire")
fire.Color = Color3.new(0,0,1)
fire.Parent = script.Parent

Check out the API reference for other things you can do with Fire: https://developer.roblox.com/en-us/api-reference/class/Fire

0
Oh okay that makes sense duckhunter392 25 — 1y
Ad
Log in to vote
0
Answered by
enes223 327 Moderation Voter
1 year ago

hey you! have you ever heard of enes? if you are in trouble, better call enes!

Answer this question