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

How do you use Color3?

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:


			fire = Instance.new("Fire")
			fire.Name = "fire"
			fire.Parent = Torso
			fire.Size = 25
			fire.Heat = 30
			fire.Color = Color.new(0,0,0)
			
		end
		
		end
	end

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.

2 answers

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])

fire.Color = Color3.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)).

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