Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

This thing doesnt works, attempt to perform (add) on string?

game.Lighting.TimeOfDay = game.Lighting.TimeOfDay + game.Lighting.TimeOfDay = "00:01:00"

idk what to do its supposed to be cycle, i didn't wanted it to make wait(1) everytime and copy paste game.Lighting so it will be 217 lines, but seems like this thing doesn't works

4 comments

0

Why you wrote game.Lighting.TimeOfDay 3 times?

0

uh

0

first is for accepting change, second one is base for +, third one is change for base so it will change value

0

Hmm, I'll work on it.

2 answers

✓ Accepted answer

you dont change time of day, you change minutesaftermidnight

local minutes = 0
while true do
wait()--add the amount to wait before it adds on extras
game:GetService("Lighting"):SetMinutesAfterMidnight(minutes + 1)--this is how you actually change it up
minutes = minutes + 1
end

4 comments

0

it works, loop doesnt

0

ah yea you need to say that minutes = the new time so

0

this time it works but what about miliseconds? TimeOfDay 00:00:11, the third thing

0

just add minutes + 0.whatever number

Just make this:

game.Lighting.TimeOfDay = "00:01:00"

You don't need write it 2 times if you are not adding number.

6 comments

0

you have to... its day night cycle, not changing value script.... You dont know how "+" works?

0

You need write game.lighting.timeofday = game.lighting.timeofday + 1, if you adding, i tested all of this scripts< it works

0

duh, it will change first 00, means MINUTES, i have to change seconds, you dont know how it works, dont try to help me

0

this doesnt actually change the time of day

0

exactly, it changes clocktime

0

... not how you change the time

This discussion is preserved as it was. New answers, comments, and votes are closed.