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

Why doesn't this script change the text of a gui when a certain time of day comes?

Asked by 4 years ago

There is a script in this game that makes the time of day dynamic, but whenever the ClockTime value is >= 0 it doesn't change. I may be stupid but can somebody point out what's going on here?

cc = script.Parent
f = t.Parent
t = f.TextLabel

l = game.Lighting

if l.Clocktime >= 0 then
    cc.Text = "Test"
end

And yes, this is in a local script.

0
what? lmao i only used t just in case I needed it I never used it lol MustangHeart 67 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

First - Remove the two variables that you arent using. Second - it is ClockTime not Clocktime

I tested it with those changed and it works

local cc = script.Parent


local l = game.Lighting

if l.ClockTime >= 0 then
    cc.Text = "Test"
end

0
lmao did I really do that MustangHeart 67 — 4y
0
Don't worry ive done it plenty of times and wastes plenty of hours littlemike1234_PUMAS 117 — 4y
0
Also, make sure you are always looking in the output. It can help littlemike1234_PUMAS 117 — 4y
Ad

Answer this question