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

ROBLOX ScreenGui text isn't changing and no errors pop up, help?

Asked by
Timtim 0
5 years ago

if game.Lighting.ClockTime > 5 and game.Lighting.ClockTime < 6.5 then script.Parent.Text = "Showers" if game.Lighting.ClockTime > 6.5 and game.Lighting.ClockTime < 12 then script.Parent.Text = "Breakfast" end end

I'm trying to get it to change the text of a screenGui, yet no errors come up and the text doesn't change. Any idea?

2 answers

Log in to vote
0
Answered by 5 years ago

If that is the whole script, then you need to have a loop that listens for the change within the lightning. I would do a while true do loop with a wait(1) statement to not crash your studio.

Ad
Log in to vote
0
Answered by 5 years ago

You're only running the script once upon the studio being open. Meaning that it only checks for all of those things once upon the games start. For it to constantly be checking I recommend putting all of this in a while true do loop.

Answer this question