Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Trying to do a GUI that shows a message depending on the time of Day, script wont work?

Not sure how to make this script work, and not sure how / where to make it work

while true do
	wait(.1)
	if game.Lighting.TimeOfDay = (06:00:00)
		script.Parent.Text = "Wake Up"
	end
end

1 comment

0

Yeah you forgot to add a "Then" at the end of the 'if' statement so it thinks there is another argument.

2 answers

The TimeOfDay property is a string, so do this instead:

while true do
       wait(.1)
       if game.Lighting.TimeOfDay == '6:00:00' then
              script.Parent.Text = 'Wake Up'
       end
end

try this


while true do
	    wait(.1)
	  if game.Lighting.TimeOfDay == "06:00:00" then
	      script.Parent.Text = "Wake Up"
	    end
end

it worked when i tested it with a part and textlabel, but idk what you're using it with so it might not work

This discussion is preserved as it was. New answers, comments, and votes are closed.