Tried this:
l = game:GetService("Lighting") t = script.Parent.DayType function identify() print(l.Ambient,t.Value)
if t.Value == "cold" then l.Ambient = Color3.new(162, 197, 223) elseif t.Value == "cool" then l.Ambient = Color3.new(194, 208, 223) elseif t.Value == "nice" then l.Ambient = Color3.new(189, 189, 189) elseif t.Value == "warm" then l.Ambient = Color3.new(165, 163, 137) elseif t.Value == "hot" then l.Ambient = Color3.new(118, 114, 0) else print("Wut? Unkown daytype???") end
end while wait(3) do identify() end
And got 255 times the color3 values i put in, reading as negative halves, and making the game either blinding white or empty void.
If you want to get the correct value, you would have to divide the number you want by 255, according to the ROBLOX Wiki. http://wiki.roblox.com/index.php?title=Color3
Under 'Useful Code'
if t.Value == "cold" then l.Ambient = Color3.new(162/255, 197/255, 223/255) elseif t.Value == "cool" then l.Ambient = Color3.new(194/255, 208/255, 223/255) elseif t.Value == "nice" then l.Ambient = Color3.new(189/255, 189/255, 189/255) elseif t.Value == "warm" then l.Ambient = Color3.new(165/255, 163/255, 137/255) elseif t.Value == "hot" then l.Ambient = Color3.new(118/255, 114/255, 0) else print("Wut? Unkown daytype???") end
NOTE** There is a much better way than just doing it this way, instead of individually dividing everything by 255. Also, note that 0 does not have to be divided by 255, same with 1.