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

My script does something strange?

Asked by 9 years ago

When my script runs, I've tested the colors on a fire in game but when the script runs it makes the fire color go really strange. This is my code.

f = Instance.new("Fire",script.Parent)
f.Color = Color3.new(255,128,0)
f.SecondaryColor = Color3.new(255,0,0)

1 answer

Log in to vote
0
Answered by 9 years ago

Color3s take values between 0 and 1. If you're more familiar with the 0 - 255 range (like myself), you need to divide each number by 255.

f = Instance.new("Fire",script.Parent)
f.Color = Color3.new(255/255,128/255,0) --0 is left out because if you divide 0 by 255, you get nothing.
f.SecondaryColor = Color3.new(255/255,0,0)
Ad

Answer this question