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

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

Asked by 6 years ago
Edited 6 years ago
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

Log in to vote
0
Answered by 6 years ago

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

0
using the correct contructor will help a lot. User#5423 17 — 6y
0
You can also avoid using the /255 by passing the numbers through Color3.fromRGB rather than Color3.new. jd12048 7 — 6y
Ad

Answer this question