How do I set the ingames lighting to irl lighting

I know theres been posts about this already but I just need help with this script



local function GetTime()
	local UTCSeconds = os.time()

	local SecondsInHour = 3600

	local ESTSeconds = UTCSeconds - (SecondsInHour * 4) 
	local ESTDate = os.date("!*t", ESTSeconds)

	local hourString = tostring(ESTDate.hour > 12 and ESTDate.hour % 12 or ESTDate.hour)
	local minuteString = ESTDate.min < 10 and "0"..ESTDate.min or tostring(ESTDate.min)
	local period = ESTDate.hour > 12 and "PM" or "AM"

	print("The time is "..hourString..":"..minuteString.." "..period)
end

I have a function here how do I format it and set the ingame lighting to this? This gets the current time of EST

local Time = os.date("!*t", (os.time() - (3600 * 4)))

game:GetService("Lighting").TimeOfDay = Time.hour..":"..Time.min..":"..Time.sec
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.