Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I add a rainbow fire effect?

So, I have been working on effects for people to get however, I have one more that I cannot figure out how to do. A rainbow fire effect. It basically is a color changing flame. This is the flame script I use:

return function(Knife)
    local Fire = Instance.new("Fire", Knife.Handle)
    Fire.Heat = 5
    Fire.Size = 2
end

Here is the blue version:

return function(Knife)
	local Fire = Instance.new("Fire", Knife.Handle)
	Fire.Heat = 5
	Fire.Size = 3
	Fire.Color = Color3.fromRGB(0, 85, 255)
end

Now I am looking for a rainbow color changing fire, anyone offering for help? Or just give me the whole script? It would be very much appreciated.

1 comment

0

please adda code block

1 answer

There are many things wrong with your code.

First of all, please add a code block. (Thanks, youtubemasterWOW)

Before you start a function you set it up like:

function NAME(parameters)
end

And when you give a function parameter(s), you must call the function and give the parameters. Example:

function NAME(parameters)
parameter:Destroy()
end

local part = script.Parent

NAME(part)

Here's the code:

function Knife(Knife)
    local Fire = Instance.new("Fire", Knife.Handle)
    Fire.Heat = 5
    Fire.Size = 2
end

function Knife2(Knife)
    local Fire = Instance.new("Fire", Knife.Handle)
    Fire.Heat = 5
    Fire.Size = 3
    Fire.Color = Color3.fromRGB(0, 85, 255)
end

local Knife1 -- what knife1 is
local Knife2 -- what knife2 is

Knife(Knife1)
Knife2(Knife2)

This discussion is preserved as it was. New answers, comments, and votes are closed.