if game.Lighting.TimeOfDay== ("14:00:00") then
game.StarterGui.yet.TextBox2.Text = ("Free Time")
end
is what i typed, and it says it works, but nothing happens when that time is reached.
if game.Lighting.TimeOfDay== ("14:00:00") then
game.StarterGui.yet.TextBox2.Text = ("Free Time")
end
is what i typed, and it says it works, but nothing happens when that time is reached.
Are you using an event to detect change? If not, here's an example of how you can detect if the TimeOfDay is changing.
local Lighting = game:GetService("Lighting")
Lighting:GetPropertyChangedSignal("TimeOfDay"):Connect(function()
print(Lighting.TimeOfDay)
-- the code inside here will run any time Lighting.TimeOfDay changes, allowing you to do
if Lighting.TimeOfDay == "14:00:00" then
print("free time")
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Have you made sure the time of day is changing?
yes