I have a text mesh in my game that's outside on the water, and what I've noticed is that you can't see the black color when it's night, but you can see the white color when it's night. Here's what I have with my script so far, but yet again, it's probably wrong. If anyone could make a thing that when it's day - make the block black and when it's night - make the block white. Thanks!
My faulty code:
script.Parent.Name = "LightPart"
lightPart = game.Workspace.LightPart
minutesAfterMidnight = 0
while true do
minutesAfterMidnight = minutesAfterMidnight + 10
game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight)
wait(0.1)
if game.Lighting:GetMinutesAfterMidnight() == 6 * 60 then -- checks for 6AM
lightPart.BrickColor = BrickColor.new(Color3.new(1, 1, 1))
lightPart.PointLight.Enabled = false
end
if game.Lighting:GetMinutesAfterMidnight() == 18 * 60 then -- checks for 6PM
lightPart.BrickColor = BrickColor.new(Color3.new(255, 255, 255))
lightPart.PointLight.Enabled = true
end
end
