generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Updating a Variable

Previous Thread :: Next Thread 
BrainSqueezer is not online. BrainSqueezer
Joined: 19 Aug 2009
Total Posts: 432
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 is not online. 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
BrainSqueezer is not online. BrainSqueezer
Joined: 19 Aug 2009
Total Posts: 432
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
BrainSqueezer is not online. BrainSqueezer
Joined: 19 Aug 2009
Total Posts: 432
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 is not online. 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
BrainSqueezer is not online. BrainSqueezer
Joined: 19 Aug 2009
Total Posts: 432
17 Jan 2014 05:09 PM
Good idea! Thanks
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image