Hi so I’m not a scripter at all, so I decided to follow a tutorial about street lamps (by ROBLOX).
The time is set 24h (midnight) in game, lamps are on. Whenever I do :time 14, they turn off.
And after trying to put it back to 24, they don’t turn on.
I have tried re scripting this, but I couldn’t find a solution to fix this.
local lightPart = script.Parent
local PointLight = lightPart.PointLight
while true do
wait(0.1)
if game.Lighting:GetMinutesAfterMidnight() > 6 * 60 then
lightPart.Material = Enum.Material.Plastic
PointLight.Enabled = false
end
if game.Lighting:GetMinutesAfterMidnight() > 18 * 60 then
lightPart.Material = Enum.Material.Neon
PointLight.Enabled = true
end
end
Hopefully someone answers