Hope You Like It :D
Script -
-- Get the Lighting service
local lighting = game:GetService("Lighting")
local dayLength = 15 -- Change this to the length of your day in seconds
local nightLength = 15 -- Change this to the length of your night in seconds
while true do
-- Day time: 6 AM to 6 PM
for i = 6 * 60, 18 * 60 do
lighting:SetMinutesAfterMidnight(i)
wait(dayLength / (12 * 60))
end
-- Night time: 6 PM to 6 AM
for i = 18 * 60, 24 * 60 do
lighting:SetMinutesAfterMidnight(i)
wait(nightLength / (12 * 60))
end
for i = 0, 6 * 60 do
lighting:SetMinutesAfterMidnight(i)
wait(nightLength / (12 * 60))
end
end
16 июн 2024