local part = script.Parent
part.BrickColor = BrickColor.new("Institutional white")
while true do
wait(0.1)
local timeoday = game.Lighting.ClockTime
if timeoday > 17.6 or timeoday < 6.4 then
part.Color = BrickColor.new("Institutional white")
else
part.Color = BrickColor.new("Really black")
end
So here I want to make a brick color change when it's between 17.6 and 6.4. BUt it refuses to work. Why is tha?

4 comments
You can also use your method, but you are also missing and end for your if statement.
Thanks but I am getting this output error
18:41:32.935 - Lightning is not a valid member of DataModel
That is odd, maybe try using a variable for lightning. Such as: local Lightning = game:GetService('Lightning').