Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Aqu_ia 39
4 years ago
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

Log in to vote
0
Answered by
KDarren12 705 Donator Moderation Voter
4 years ago

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

0
I fixed it but it still doesn't work. Aqu_ia 39 — 4y
0
hmmm KDarren12 705 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

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

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

Answer this question