I'm trying to make a Point Light fade colours using this script:
local Red = 255
local Green = 0
local Blue = 0
local ColorValueSet = script.Parent.Parent.Parent.Part
spawn(function(SetColour)
while wait(0.1) do
script.Parent.Parent.PointLight.Color = Color3.new(Red,Green,Blue)
print(Red,Green,Blue)
end
end)
while wait(0.1) do
for i = 0,255 do
wait(0.1)
Green = i
end
wait(0.1)
for i = 255,0 do
wait(0.1)
Red = i
end
for i = 0,255 do
Blue = i
wait(0.1)
end
for i = 255,0 do
wait(0.1)
Green = i
end
for i = 0,255 do
wait(0.1)
Red = i
end
for i = 255,0 do
Blue = i
wait(0.1)
end
end
The code above appears to be working properly, but for some reason, the RGB values on the actual Point Light appear to be bugged: https://gyazo.com/1c8fd40df4581d83f6f0e558687976e8

2 comments
happened to me also..
Color3.new requires numbers between 0 and 1, due to how it was designed. To get the proper color, you need to either 1. Continue to use Color3.new() and divide the RGB colors by 255, or 2. Move to using Color3.fromRGB() and continue using integer values.