DSILOVER
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 51 |
|
|
| 26 Jan 2014 01:21 PM |
| I am working on a simple script that reads a numeric value, and then changes the text of the textgui it is contained in to include the number from that value. For once I managed to make the more difficult part work without any help, but now I cant get it to do something as simple as loop. I put in one of the simplest loops (while true do), included a wait(1) to prevent it from destroying my computer, and ended it with an end to make it loop, and yet it only runs the first time. Can anyone please explain why? |
|
|
| Report Abuse |
|
|
DSILOVER
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 51 |
|
|
| 26 Jan 2014 01:22 PM |
Forgot to paste the script, sorry
while true do script.Parent.Text = "Day "..day.."" wait(1) end |
|
|
| Report Abuse |
|
|
DSILOVER
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 51 |
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 26 Jan 2014 02:08 PM |
| What is day? You've done it wrong. Firstly it should say day.Value and wherever you described the variable 'day' should not have value on the end. |
|
|
| Report Abuse |
|
|
Korrium
|
  |
| Joined: 25 Aug 2009 |
| Total Posts: 729 |
|
|
| 26 Jan 2014 02:24 PM |
| cript.Parent.Text = "Day "..day.." " |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
| |
|
shawnyg
|
  |
| Joined: 21 Apr 2011 |
| Total Posts: 1428 |
|
|
| 26 Jan 2014 03:05 PM |
Show us how you defined "day"...
while true do script.Parent.Text = "Day "..day --you don't need another concetanation (however you spell that) wait(1) end
~Hope I helped, if you need a script, PM me. ~Glory to CAT!~ ~CAT General Shawnyg~ |
|
|
| Report Abuse |
|
|