Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I simultaneously run two loops?

Asked by 10 years ago

I'm not necessarily the most pro-efficient when it comes to scripting. The script I entered will not show any output changes, not even the prints. None of the lines came up as errors on Studio. ~~~~~~~~~~~~~~~~~ while wait(60) do game.Lighting:SetMinutesAfterMidnight(game.Lighting:GetMinutesAfterMidnight()+1) --adds 1 minute to the current time every 60 seconds. print("time+1") break -- Do loops prevent all codes underneath "end" to not run? Either way, it's not breaking. end

ServerTimeUnder6=game.Lighting:GetMinutesAfterMidnight()<=361 FogControlColor=game.Lighting.FogColor.Vector3.new FogControlEnd=game.Lighting.FogEnd FogControlStart=game.Lighting.FogStart

if ServerTimeUnder6 then FogControlColor(0,0,0) print("good") --Not Sure about these parts. FogControlEnd(100) print("good2") FogControlStart(20) print ("good3")

end ~~~~~~~~~~~~~~~~~

Answer this question