|
| 28 Dec 2015 01:58 PM |
I'm trying to make something that once it's a certain time of day and above then the point lights are disabled then once it hits a different time it's disabled. There are multiple light so I'm not sure if I can refer to them the way I did and also I'm not sure whether I need a local script or not.
Lighting = game.Lighting
if Lighting.TimeofDay >= "06:25:00" < "18:30:00" then game.Streetlights.Pointlight.Enabled=false elseif Lighting.TimeofDay >= "18:30:00" < "06:25:00" then game.Streetlights.Pointlight.Enabled=true end
Excuse me being a lua noob :)
〜(^∇^〜)(〜^∇^)〜 *:・゚✧PARTY TIME *:・゚✧ (づ ̄ ³ ̄)づ O(≧▽≦)O |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 02:01 PM |
You can't use <,>,=<,>= when comparing time.
if Lighting.TimeofDay == "06:25:00" then game.Streetlights.Pointlight.Enabled=false elseif Lighting.TimeofDay == "18:30:00" then game.Streetlights.Pointlight.Enabled=true end |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 02:02 PM |
*You can't use <,>,=<,>= when comparing TimeOfDay, because it's a string value.*
I had to rephrase that. |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 02:03 PM |
It's still not working :/
〜(^∇^〜)(〜^∇^)〜 *:・゚✧PARTY TIME *:・゚✧ (づ ̄ ³ ̄)づ O(≧▽≦)O |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 02:07 PM |
You also have to put it on a loop so it constantly checks the time.
while wait() do if Lighting.TimeofDay == "06:25:00" then game.Streetlights.Pointlight.Enabled=false elseif Lighting.TimeofDay == "18:30:00" then game.Streetlights.Pointlight.Enabled=true end end |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 02:10 PM |
Well now the output is saying 14:11:03.328 - TimeofDay is not a valid member of Lighting so I tried defining timeofday for it, but it still didn't work.
〜(^∇^〜)(〜^∇^)〜 *:・゚✧PARTY TIME *:・゚✧ (づ ̄ ³ ̄)づ O(≧▽≦)O |
|
|
| Report Abuse |
|
|
| |
|
|
| 28 Dec 2015 02:13 PM |
Still not working q.q
〜(^∇^〜)(〜^∇^)〜 *:・゚✧PARTY TIME *:・゚✧ (づ ̄ ³ ̄)づ O(≧▽≦)O |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2015 02:30 PM |
bump
〜(^∇^〜)(〜^∇^)〜 *:・゚✧PARTY TIME *:・゚✧ (づ ̄ ³ ̄)づ O(≧▽≦)O |
|
|
| Report Abuse |
|
|