Light = game.Workspace.Lamp.LightPart
Time = 0
while true do
Time = Time+4
game.Lighting:SetMinutesAfterMidnight(Time)
wait(.1)
if game.Lighting:GetMinutesAfterMidnight == 6 * 60 then
Light.Material = Enum.Material.Plastic
Light.PointLight.Enabled = false
end
if game.Lighting:GetMinutesAfterMidnight == 18 * 60 then
Light.Material = Enum.Material.Neon
Light.PointLight.Enabled = true
end
end
That's the code I'm using to turn a lamp on and of at certain times in the day but in the first "if then" statement "==" cause an error because it expects a ( or { how do I fix this (And yes the is the Wiki's Tutorial day/night script).

2 comments
Then why did it work in the 2nd function?
What does the output say?