"QUICK, GET AN LUAMBULANCE!" (ha ha ha. get it?)
I am in the middle of making an Day/Night script and this is how it went.
if true do game.Lighting:SetMinutesAfterMidnight(12 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(18 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(00 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(6 * 1) wait(1) end
Whenever I run/test the game it would say the following:
ServerScriptService.DayNightScript:1: 'then' expected near 'do'
So I followed the instructions and made the changes to the script and this is what i got.
if true then do game.Lighting:SetMinutesAfterMidnight(12 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(18 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(00 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(6 * 1) wait(1) end end
Now when i run the game this time, the script changed the day to night as soon as i started and it won't repeat itself. It's kinda weird so please help me. I'm just starting out as a scripter. Thanks in advance. I want to be original as possible!
Peace!
while true do game.Lighting:SetMinutesAfterMidnight(12 * 1) wait(5) game.Lighting:SetMinutesAfterMidnight(18 * 1) wait(5) game.Lighting:SetMinutesAfterMidnight(00 * 1) wait(5) game.Lighting:SetMinutesAfterMidnight(6 * 1) wait(5) end
This may work
try
while true do game.Lighting:SetMinutesAfterMidnight(12 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(18 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(00 * 1) wait(1) game.Lighting:SetMinutesAfterMidnight(6 * 1) wait(1) end end