Please upvote my rep and/or mark this as the correct answer if this helped you or solved your question.
I can't really explain the problem but here's the basic version of it:
You can't use : because thats where the number ends. To fix the error simply replace the : with a ., making it a decimal.
Fixed version:
ambient = game.Lighting.Ambient
outdoorAmbient = game.Lighting.OutdoorAmbient
timeOfDay = game.Lighting.TimeOfDay
if timeOfday >= 18.00.00 and <= 06.00.00 then
ambient = 0,0,0
outdoorAmbient = 0,0,0
end
-- Edit --
If that doesn't work its because ambient is set to the value of game.Lighting.Ambient's.
If it doesn't work, use this:
timeOfDay = game.Lighting.TimeOfDay
if timeOfday >= 18.00.00 and <= 06.00.00 then
game.Lighting.Ambient = 0,0,0
game.Lighting.OutdoorAmbient = 0,0,0
end
1 comment
Actually, TimeOfDay is a string value.