|
| 09 Jul 2015 11:13 AM |
It's not working, however. Could you tell me what's wrong?
function onButtonClicked() game.Lighting.TimeOfDay = 1 end |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 09 Jul 2015 11:14 AM |
| Use game.Lighting:SetMinutesAfterMidnight(1) instead, because TimeOfDay expects a string like "xx:xx:xx" with the x's as numbers. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2015 11:19 AM |
That didn't work. :(
Is there something wrong in my original script? |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 09 Jul 2015 12:08 PM |
| You must not have connected it to an event. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2015 02:26 PM |
| Sorry I'm new to this but how do I connect it to an event? |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2015 03:04 PM |
* = Direction of your clickdetector
*.MouseClick:connect(onButtonClicked)
Adding that to your script should fix your problem. |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2015 03:04 PM |
By direction I mean where it is located
ex: game.Workspace.ClickDetector |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2015 03:16 PM |
| Isn't that for surface guis? |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 09 Jul 2015 05:12 PM |
script.Parent.MouseButton1Click:connect(function() game.Lighting.TimeOfDay = "09:00:00" end)
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2015 05:27 PM |
IT WORKED
you're awesome tysm |
|
|
| Report Abuse |
|
|