I have tried over and over again but failed constantly, I need help with this.. The text after this message is my code
local MinutesAfterMidnight = 0
while true do
game.Lighting:SetMinutesAfterMidnight(MinutesAfterMidnight)
MinutesAfterMidnight = MinutesAfterMidnight + 1
wait (0.01)
if MinutesAfterMidnight >= 6 * 60 and MinutesAfterMidnight <= 18 * 60 then
game.Lighting.Brightness = (1)
game.Lighting.OutdoorAmbient.r = (0/255)
game.Lighting.OutdoorAmbient.g = (0/255)
game.Lighting.OutdoorAmbient.b = (0/255)
end
if MinutesAfterMidnight >= 18 * 60 and MinutesAfterMidnight <= 6 * 60 then
game.Lighting.Brightness = (0)
game.Lighting.OutdoorAmbient.r = (135/255)
game.Lighting.OutdoorAmbient.g = (135/255)
game.Lighting.OutdoorAmbient.b = (128/255)
end
end

2 comments
OutdoorAmbient requires a new Color3 object each time e.g. game.Lighting.OutdoorAmbient = Color3.new(135/255, 135/255, 128/255)
The r, g, b of a Color3 object are read only http://wiki.roblox.com/index.php?title=Color3#Properties