Hello! I am trying to learn how to make a GUI pop up at a certain time using the time from lighting. I have a time-changing script and I would like a GUI to show up, for an example, when it hits 6:00:00 and disappears at 7:00:00.
This is my very first script I am trying to make, so it probably has a lot of errors, I apologize. Things like I don't know if ServerStorage is the correct place to store something like this, where I would put this script (I put it as an extension of the textbox), if I have the labeling correct, and if "Enabled" is the right term because I see the checkbox is actually called "Visible".
TextBox = game.ServerStorage.ScreenGui.TextBox
minutesAfterMidnight = 0
while true do
minutesAfterMidnight = minutesAfterMidnight + 10
game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight)
wait(0.1)
if game.Lighting:GetMinutesAfterMidnight() == 7 * 60 then
TextBox.Enabled = false
end
if game.Lighting:GetMinutesAfterMidnight() == 6 * 60 then
TextBox.Enabled = true
end
end
Thanks :)

2 comments
For normal Server Scripts, you should use ServerStorage. For LocalScripts, you should use ReplicatedStorage.
Thanks!