I want to make a GUI visible in my game, my code is
while wait(0.1) do if game.Lighting:GetMinutesAfterMidnight() > 8 * 60 then script.Parent.Visible = true end if game.Lighting:GetMinutesAfterMidnight() > 10 * 60 then script.Parent.Visible = false end end
(Sorry for the bad spacing im new to the website and idk how to do the formats and spacings, any help will be appreciated. Thx a lot.)

3 comments
the question is a bit ambiguous, do you mean period of time in the game or in real life time? btw to format code you can click the little blue circle and put the code between the lines
Hi, thx for the comment. My code is basically if the time in game is larger than 8 o clock, the GUI will be visible and if the time is larger than 10, it wont be visible. It kinda works when i change the time manually but when it goes with the day night cycle script, it doesnt work. Do you know how to fix this? Thanks!
Hi, sorry for the late reply. I saw your answer and i tried, how does it work for you? I put in under the text label inside starter GUI, however it doesnt work, can you tell me which day night cycle are you using to make it worK? Thanks!