I am trying to make a light for a light pole turn on at 6PM (18 * 60) ingame and off at 6AM (6 * 60) ingame, but it tells me there is a function argument expected on line 8, with red wavy lines under the double equal sign.
What am I doing wrong?
LightPolelight = game.Workspace.LightPoleLight minutesAfterMidnight = 0 while true do minutesAfterMidnight = minutesAfterMidnight + 10 game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight) wait(.1)
if game.Lighting:GetMinutesAfterMidnight == 6*10 then
LightPolelight.Material = Enum.Material.Plastic
LightPolelight.PointLight.Enabled = false
end
if game.Lighting:GetMinutesAfterMidnight == 18*60 then
LightPolelight.Material = Enum.Material.Neon
LightPolelight.PointLight.Enabled = true
end
end
OUTPUT: 12:08:25.568 - Workspace.Script:8: function arguments expected near '=='

3 comments
It messed the first part of the script up...
You can edit it and fix by clicking 'Edit'. Anyhow, ":GetMinutesAfterMidnight" should be ":GetMinutesAfterMidnight()".
Now when I run the script, the pointer light does not turn off when 6AM reaches. Does anyone know the problem?