So I'm trying to make a GUI that displays the time using the "GetMinutesAfterMidnight()" line. I have this, but it isn't working. I just get a script timeout.
local timeCheck = game.Lighting:GetMinutesAfterMidnight()
while true do
if timeCheck < (1 * 60) then
script.Parent.Text = "12 AM"
else
if timeCheck < (2 * 60) and timeCheck > 59 then
script.Parent.Text = "1 AM"
end
end
end
-- then I add extra of the above going from 12AM - 11PM
This might have something to do with the "else" tag, but I'm not sure.

6 comments
The GUI isn't updating, and now I'm getting the error "Text is not a valid member of Workspace" (Nevermind it was another script causing that error)
Do you have something named "Text" inside of a GUI?
In that case, you targetted it in "Workspace", not "Workspace.GUI_NAME"
Yeah its not working. It updates to 12 AM only when the game starts, and then it stops.
Never mind I used another script, but I'll accept this so you get the reputation.
Thanks.