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

How would I go by making a GUI appear at a certain time of day?

local Lighting = game:GetService('Lighting")
local Player = game.Players.LocalPlayer

if Lighting.TimeOfDay == "06:20:20" then
	script.Parent.TextButton.Visible = true
	wait(1)
	script.Parent.TextButton.Visible = false
end

This is my script but it doesn't seem to work. Help, please?

2 answers

This is what you used for getting the service of lighting: 'Lighting". You didn't use " for an opening quotation.

local Lighting = game:GetService("Lighting")
	local Player = game.Players.LocalPlayer
	 
	if Lighting.TimeOfDay == "06:20:20" then
	    script.Parent.TextButton.Visible = true
	    wait(1)
	    script.Parent.TextButton.Visible = false
	end

2 comments

0

I fixed it but it still doesn't work.

0

hmmm

try putting it in a while loop and setting the condition as lighting.timeofday == "6:20:20" then

1 comment

0

This first part actually makes sense: this if statement only activates when the game is started, then it never runs again.

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