I know that I have no code here and apparently that's against the rules, but I've looked everywhere and I'm pulling my hair out trying to make a script call on the time of day. Is it possible?
Obviously, I know next to nothing about scripting. I have been in college for all of 4 weeks for computer science, so most of this is still way over my head. Basically, I need something that toggles true at one time of day and false at another, allowing it to cycle with each in game day. The only variable I've seen so far that even looks at the time is MinutesAfterMidnight, which is being a pain to attempt to work with. Any help as far as a better way to call on the time of day would be greatly appreciated.
function getTime() local currentTime = game.Lighting:GetMinutesAfterMidnight() if currentTime >= 8*60 and currentTime <= 17*60 then --8 AM to 5PM --code elseif currentTime < 8*60 or currentTime > 17*60 then --Before 8 AM or after 5 PM --code end end game.Lighting.Changed:connect(function() getTime() end) getTime()