generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Pointlights enabled once it's a certain time of day

Previous Thread :: Next Thread 
iFunctionOnTouch is not online. iFunctionOnTouch
Joined: 22 Dec 2015
Total Posts: 2685
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
MinisterWealthy is not online. MinisterWealthy
Joined: 05 May 2010
Total Posts: 2967
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
MinisterWealthy is not online. MinisterWealthy
Joined: 05 May 2010
Total Posts: 2967
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
iFunctionOnTouch is not online. iFunctionOnTouch
Joined: 22 Dec 2015
Total Posts: 2685
28 Dec 2015 02:03 PM
It's still not working :/


〜(^∇^〜)(〜^∇^)〜 *:・゚✧PARTY TIME *:・゚✧ (づ ̄ ³ ̄)づ O(≧▽≦)O
Report Abuse
MinisterWealthy is not online. MinisterWealthy
Joined: 05 May 2010
Total Posts: 2967
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
iFunctionOnTouch is not online. iFunctionOnTouch
Joined: 22 Dec 2015
Total Posts: 2685
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
MinisterWealthy is not online. MinisterWealthy
Joined: 05 May 2010
Total Posts: 2967
28 Dec 2015 02:12 PM
It's TimeOfDay
Report Abuse
iFunctionOnTouch is not online. iFunctionOnTouch
Joined: 22 Dec 2015
Total Posts: 2685
28 Dec 2015 02:13 PM
Still not working q.q


〜(^∇^〜)(〜^∇^)〜 *:・゚✧PARTY TIME *:・゚✧ (づ ̄ ³ ̄)づ O(≧▽≦)O
Report Abuse
iFunctionOnTouch is not online. iFunctionOnTouch
Joined: 22 Dec 2015
Total Posts: 2685
28 Dec 2015 02:30 PM
bump


〜(^∇^〜)(〜^∇^)〜 *:・゚✧PARTY TIME *:・゚✧ (づ ̄ ³ ̄)づ O(≧▽≦)O
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image