Game.Lighting:GetMinutesAfterMidnight(6 * 0) game.Lighting:GetMinutesAfterMidnight(0 * 0) So this will change it to parts of the day. And that would change the time to 5:40:00 am. So what the 5 does in that piece of code is tell that Lightning needs to change the hour to 5 and the 40 is the minutes, you should know what that does now. Your correct, but your not setting any value in :GetMinutesAfterMidnight()! Here is how it works from my understanding game.Lighting:GetMinutesAfterMidnight(5 * 40)Īlso, just to keep in mind, lighting uses military time. Local z = false - this will serve as a way to tell when the tool has been activated. the time i chose is sunset, my personal favorite. Local y = 18 - set this value to the time you want to change it to. Local x = script.CurrentTime - time it was when you changed the time in theory it should work, comment if it doesnt and il find out whats wrong.įirst lets add an IntValue into the script were going to make. so here is the solution i would come up with, but havent tested. so lets say that you dont have a script in your game that changes the time of the day in real time, by that i mean a day/ night cycle. Just set a local for the time of day to the time it was when you called the function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |