|
| 17 Jan 2014 04:34 PM |
Are there any nice ways to update a variable? Like, if you had:
chilluns = workspace:GetChildren()
and you added more children to workspace, could you instantly update 'chilluns' to account for them? |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 17 Jan 2014 04:37 PM |
Just write it out again... And it would work like:
bob = workspace:GetChildren() --player added now
Print all bob stuff player would be printed
So what I'm saying (lazily) is you don't need to write it out again ( I think). |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 04:43 PM |
| Unfortunately, you do need to update it for it to print player. I'm hoping there's a way I don't have to write it out each time, because I'm going to be using it constantly. Like you said, laziness :) |
|
|
| Report Abuse |
|
|
|
| 17 Jan 2014 04:59 PM |
| Anybody know? I'd like a response, even if it's to say that it can't be done. |
|
|
| Report Abuse |
|
|
Zomebody
|
  |
| Joined: 01 Jun 2010 |
| Total Posts: 789 |
|
|
| 17 Jan 2014 05:03 PM |
| If you want to update something when an Instance is added to the workspace, I recommend using the ChildAdded() event. |
|
|
| Report Abuse |
|
|
| |
|