of     1   

IdiomicLanguage
#34248970Wednesday, September 22, 2010 11:55 PM GMT

I've been working on a quick advanced Lighting script, for about an hour and a half, and have encounterd a slight delema... When I test it out it works, but then it stops, and glitches the Lighting. Any clue how to fix it? It Might be Hard for new lua users. -------------------------------------------- Time = game:service("Lighting") function a () i = 12 while true do if i == 0 then while i < 12 do wait(0.0001) Time:SetMinutesAfterMidnight(Time:GetMinutesAfterMidnight()+0.0001) i = i + 0.0001 end end if i == 12 then while i > 0 do wait(0.0001) Time:SetMinutesAfterMidnight(Time:GetMinutesAfterMidnight()-0.0001) i = i - 0.0001 end end end end function c () while true do running = false while Time.Ambient ~= Color3.new(0, (Time.Ambient.g), (Time.Ambient.b)) do running = true wait(0.000282332941176) Time.Ambient = Time.Ambient - Color3.new(0.0001, 0, 0) if Time.Ambient == Color3.new(0, (Time.Ambient.g), (Time.Ambient.b)) then running = false end end while Time.Ambient ~= Color3.new(255, (Time.Ambient.g), (Time.Ambient.b)) do running = true wait(0.000282332941176) Time.Ambient = Time.Ambient + Color3.new(0.0001, 0, 0) if Time.Ambient == Color3.new(255, (Time.Ambient.g), (Time.Ambient.b)) then running = false end end end end function d () while true do running = false while Time.Ambient ~= Color3.new((Time.Ambient.r), 0, 0) do running = true wait(0.000336448598131) Time.Ambient = Time.Ambient - Color3.new(0, 0.0001, 0.0001) if Time.Ambient == Color3.new((Time.Ambient.r), 0, 0) then running = false end end while Time.Ambient ~= Color3.new((Time.Ambient.r), 215, 215) do running = true wait(0.000336448598131) Time.Ambient = Time.Ambient + Color3.new(0, 0.0001, 0.0001) if Time.Ambient == Color3.new((Time.Ambient.r), 215, 215) then running = false end end end end function b () coroutine.new(c, d) end Time.Ambient = Color3.new(255, 215, 215) Time:SetMinutesAfterMidnight(720) --12:00, or 60 min an hour, wiht 12 hours. coroutine.new(a, b)
IdiomicLanguage
#34249029Wednesday, September 22, 2010 11:56 PM GMT

Output wont work here I think because of the coroutines...
dannyboy2k8
#34249146Wednesday, September 22, 2010 11:57 PM GMT

I normaly find that when i dont get any output, it's because the connection lines are wrong or not even there at all lol. Check your connections.
rsdogy
#34249153Wednesday, September 22, 2010 11:57 PM GMT

Do you have any ideas of where the problem may lie? The only info we got is... A.)Its for lighting B.)OutPut Don't work What is the glitch? Give us something to work with! ~Rsdogy
IdiomicLanguage
#34249351Thursday, September 23, 2010 12:00 AM GMT

There isent a glitch! For some reason, my script is not working. I would like you guys to point out what is wronge, sence out put can't work with coroutines, it just says that somthing is wronge inside of the coroutine on line 72.
Arthur123
#34249356Thursday, September 23, 2010 12:00 AM GMT

1) wait() is the shortest argument you can give to it, it equals roughly 0.03sec 2) I suggest a complete recheck of your while/coroutine logic, that is quite a probable error.
IdiomicLanguage
#34249492Thursday, September 23, 2010 12:01 AM GMT

I can't find any thing wronge with the script, so I think the output is wronge, and that by useing such small meshers of time, my script some how glitches the lighting.
IdiomicLanguage
#34249713Thursday, September 23, 2010 12:04 AM GMT

I need to use vary small amounts of time to make the Color3.new(255,215,215) turn to (0,0,0) at the same time.
Arthur123
#34249722Thursday, September 23, 2010 12:04 AM GMT

Just a guess but... function b () coroutine.new(c, d) end Time.Ambient = Color3.new(255, 215, 215) Time:SetMinutesAfterMidnight(720) --12:00, or 60 min an hour, wiht 12 hours. coroutine.new(a, b) end -- Hmmmm?
Arthur123
#34249788Thursday, September 23, 2010 12:05 AM GMT

"I need to use vary small amounts of time to make the Color3.new(255,215,215) turn to (0,0,0) at the same time.": The smallest you can get is 0.03 which is the same as wait().

    of     1