How to Make a Day/Night Cycle in Roblox Studio – Video
Download – Day/Night Cycle Script
- hello everybody and welcome back to another buzzy video today i’m going to show you how to make a day night cycle in roblox studio
- so firstgo into server script service you’re going to add a script call it whatever you want i’m going to call it the daynight script
- come over here we’re going to make a new variable we’re going to call it time of day i’m going to set it equal to zero
- next we’re going to make a while loop i’m going to wild true do then in that while loop we’re going to do game calling get service and lightning the lighting service and using the lighting service we’re going to do set minutes after midnight and we’re going to put timeofday in the parentheses
- next we’re going to increment time of day so that it keeps increasing
- we’re going to do three this is going to be really fast but it’s going to show you guys the progression
- then we’re going to add a weight for 0.1 seconds exit out and we’re going to get in game
- now that we are in game it is going to start getting lighter any minute and you can see it over there and
- there we go and eventually it will become nighttime again and that will continue forever because of our while loop