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

How can I change the color the fire when part is touched?

script.Parent.Touched:connect(function(fire)
	local fire = Instance.new("Fire",script.Parent)
   fire.Color = Color3.new(math.random)
end

I feel like this should do it but i was wrong

1 answer

✓ Accepted answer

Hi jude,

What you are trying to do is quite easy. You just need to set the Color3 property to a Color3Value. So, this is how you formulate changing Color3s and creating them:

local color3_i_want = Color3.new(0/255, 0/255, 0/255); --[[
 You don't need the '/255' but, it helps to form proper colors because it's how RGB works. The first parameter is 'R' which is how much red you want in the color, the second parameter is 'G' which is how much green you want in the color, and the third parameter is 'B' which is how much blue you want in the color. Red, Green, and Blue can combine to make any other colors, so that's how RGB chips make any color you want them to.
--]]

fire.Color3 = color3_i_want;

##Well, I hope I helped and have a nice day/night.

Thanks,

Best regards,

~~ KingLoneCat

2 comments

0

using the correct contructor will help a lot.

0

You can also avoid using the /255 by passing the numbers through Color3.fromRGB rather than Color3.new.

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