I used the LightPart scripot from the roblox tutorial but I want the script to work on multiple parts cause it only works on one Part called Lightpart Not multiple parts called 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.Material = Enum.Material.Plastic
lightPart.PointLight.Enabled = false
end
if game.Lighting:GetMinutesAfterMidnight() == 18 * 60 then -- checks for 6PM
lightPart.Material = Enum.Material.Neon
lightPart.PointLight.Enabled = true
end
end

1 comment
In the for loop shouldn't it be "v.Material = Enum.Material.Plastic" "v.Pointlight.Enabled = false"?