Hello,
I have been trying to put a script into a TextLabel in a Gui, where when the Roblox ClockTime reaches a certain value, it changes the text. However, it does not work. I have already implemented a Day/Night script. Please help!
L = game:WaitForChild("Lighting")
while true do
if L.ClockTime == 6 then
script.Parent.Text = "Text1"
elseif L.ClockTime == 7 then
script.Parent.Text = "Text2"
elseif L.ClockTime == 8 then
script.Parent.Text = "Text3"
elseif L.ClockTime == 10 then
script.Parent.Text = "Text4"
elseif L.ClockTime == 13 then
script.Parent.Text = "Text5"
elseif L.ClockTime == 14 then
script.Parent.Text = "Text6"
elseif L.ClockTime == 17 then
script.Parent.Text = "Text7"
elseif L.ClockTime == 18 then
script.Parent.Text = "Text8"
elseif L.ClockTime == 19 then
script.Parent.Text = "Text19"
end
end

2 comments
Is your game crashing every time you try to run this?
the while true do caused that you crash the game.