|
| 18 Sep 2014 01:53 PM |
So I made a streetlight script with some help, but whenever the script runs, the light goes on at 390 (6:30) and turns off at 0 (Midnight)
while wait() do if t:GetMinutesAfterMidnight() <= 1050 then print(1) sp.PointLight.Enabled=true sp.BillboardGui.Enabled=true elseif t:GetMinutesAfterMidnight() <= 390 then print(2) sp.PointLight.Enabled=false sp.BillboardGui.Enabled=false end print("Still Working") end
The script looks fine to me, please help?
|
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 01:54 PM |
| Also, 2 won't print in the output. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 01:56 PM |
| Swap your conditionals, it will only check the second one if the first one is false. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 02:00 PM |
| I'm confused, I used a lot of wiki. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 02:05 PM |
| Another thing, 1 prints until 17:30 (1050) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|