Haxcler
|
  |
| Joined: 17 Mar 2015 |
| Total Posts: 6 |
|
|
| 23 Aug 2015 11:54 AM |
I'm trying to make the text change when the TimeOfDay is 7:00:00 but when I do it don't some help? This is the script I make and don't work:
while true do if game.Lighting.TimeOfDay and "7:00:00" then do script.Parent.Text = "SomeTextHere" end end end |
|
|
| Report Abuse |
|
|
lupine
|
  |
| Joined: 24 Jun 2008 |
| Total Posts: 3561 |
|
|
| 23 Aug 2015 11:56 AM |
while wait() do if game.Lighting.TimeOfDay == "7:00:00" then script.Parent.Text = "Some text here" end end |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 11:57 AM |
| Why would it be while wait() do? Is it because a while true do loop wouldn't work, as it would be time based or...? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 12:10 PM |
@tan while true do would crash your game without a wait() and thats what while wait() do does |
|
|
| Report Abuse |
|
|
lupine
|
  |
| Joined: 24 Jun 2008 |
| Total Posts: 3561 |
|
|
| 23 Aug 2015 12:16 PM |
while wait() do end
is, for intents and purposes, identicle to
while true do wait() end
I wouldn't use 'while wait() do' if I needed an actual condition for the while/do loop.
while x == 1 do wait() end |
|
|
| Report Abuse |
|
|
Haxcler
|
  |
| Joined: 17 Mar 2015 |
| Total Posts: 6 |
|
| |
|