I have no idea how to change the time of day in a script. Like in some games, the time of day changes, eventually from day, it gets to the afternoon, from the afternoon, night. That's what I'm trying to do, how exactly would I change the time?
local Lighting = game:GetService("Lighting") Lighting.TimeOfDay = "12:00:00"
TimeOfDay takes a string that represents the current time in hours, minutes, and seconds. You have to concatenate the numbers together into a string when setting TimeOfDay. Here's an example script that goes from night to day to night.
local Lighting = game:GetService("Lighting") local seconds = 0 while true do for hours = 0, 23 do for minutes = 0, 59 do wait(0.1) Lighting.TimeOfDay = tostring(hours) .. ":" .. tostring(minutes) .. ":" .. tostring(seconds) end end end