I'm making a script in where you press 'z' a fire is inserted into your torso; in other words, a KeyDown event. But I've never used Color3, a property of 'Fire'. All I've used is BrickColor Heres my script:
01 | fire = Instance.new( "Fire" ) |
02 | fire.Name = "fire" |
03 | fire.Parent = Torso |
04 | fire.Size = 25 |
05 | fire.Heat = 30 |
06 | fire.Color = Color.new( 0 , 0 , 0 ) |
07 |
08 | end |
09 |
10 | end |
11 | end |
12 |
13 | mouse.KeyDown:connect(onPressed) |
I didn't post the other half of the script, which is basically the beginning of it, 'cause, it works out fine.
If you inserted a Fire object and adjusted the color to your choice, you can then use the value to script the colors you want.
Say you want a cyan color, and your Color3Value that you want is this: (87, 209, 236).
To adjust it, use this formula:
[Object].[Property] = [Constructor]([ValueRed], [ValueGreen], [ValueBlue])
1 | fire.Color = Color 3. new( 87 / 255 , 209 / 255 , 236 / 255 ) |
Now, I know what you're thinking. Why the heck am I dividing each number by 255??
Well, it's because each element of the value ranges from 0-1 (which makes 255/255 = 1).
So each number can not go over 1 (unless if you want to make it to 1 (white)).