I'm try making daytime changing script, but it didn't work, this is my script.
1 | while true do |
2 | game.Lightning.TimeOfDay = game.Lightning.TimeOfDay + "01:00:00" |
3 | wait( 1 ) |
4 | end |
Thx
The issue is,you are trying to perform an arithmetic operation on a string value.Also,you made a common typo mistake in your code:"Lightning".
You would need to assign a number variable to store the value of the current time,then convert it into a string.
Here is an example script of what I'm talking about:
01 | Minutes = 0 |
02 | Hours = 0 |
03 | TimeString = "" |
04 | while true do |
05 | Minutes = Minutes+ 10 |
06 | if Minutes> = 60 then |
07 | Minutes = 0 |
08 | Hours = Hours+ 1 |
09 | end |
10 | if Hours> 24 then Hours = 0 end |
11 | game.Lighting.TimeOfDay = tostring (Hours).. ":" .. tostring (Minutes).. ":00" |
12 | wait( 1 ) |
13 | end |
I hope this helps.