I tried this:
while true do
wait(30)
script.Parent.TimeOfDay = +1
end
I simply just want the ToD to go up once. It would not function properly. Help?
I tried this:
while true do
wait(30)
script.Parent.TimeOfDay = +1
end
I simply just want the ToD to go up once. It would not function properly. Help?
Well, there are several problems with this script, especially if this script is stored in Lighting.
string TimeOfDay The sky's current phase based on a string representation of a 24 hour clock.
Try putting this script into ServerScriptService or Workspace, this script will use SetMinutesAfterMidnight in order to get the results desired;
hour = 0 --This is based off
while wait(30) do --The script will run every 30 seconds.
hour = hour + 1 --So a hour has passed in 30 seconds, this can easily be adjusted by changing the wait time, or the 1 in the equation.
game.Lighting:SetMinutesAfterMidnight((hour*60)) --There are 60 minutes in a hour, so it will multiply hour by 60 otherwise you'll only get minutes past midnight.
end --Show the script that is the end of the loop and keep running it.
This discussion is preserved as it was. New answers, comments, and votes are closed.