MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:06 PM |
| How does it work? If it's too complicated, just say so. I don't know much about it. |
|
|
| Report Abuse |
|
|
Valaxia
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 73 |
|
| |
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:11 PM |
| Ok... So how would you use GetChildren() to find... say... all the yellow bricks in Workspace, and turn them green? |
|
|
| Report Abuse |
|
|
Valaxia
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 73 |
|
| |
|
|
| 28 Mar 2012 09:14 PM |
Incorporating that with a for loop:
for i, v in pairs(game.Workspace:GetChildren()) do if v.BrickColor == BrickColor.new("Bright yellow") then v.BrickColor = BrickColor.new("Bright green") end end)
† KMXD † |
|
|
| Report Abuse |
|
|
Valaxia
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 73 |
|
| |
|
|
| 28 Mar 2012 09:15 PM |
Oops, the parenthesis is not supposed to be there. :U
Just use Banana's script.
† KMXD † |
|
|
| Report Abuse |
|
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:15 PM |
... o.o WUT!?
What it 'i,v' and 'in pairs', I'm assuming v is the variable that stands for the 'Children' in Workspace... Right? But what is 'i' in front of the ',v' and... and... and... *faints from mental exhaustion* |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2012 09:16 PM |
I meant Val, lol.
Yes, I know now, but you mean change color, not remove?
† KMXD † |
|
|
| Report Abuse |
|
|
Valaxia
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 73 |
|
| |
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:20 PM |
| -.- *just revived* I just wanted to learn about GetChildren() and maybe for loops :/ I didn't want some debate or w/e... |
|
|
| Report Abuse |
|
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:22 PM |
I am EXTREMELY new to Lua. Do you think you could dumb that explanation up?
'for i,v in pairs(mytable) do print(tostring(i).." : "..v) end'
What is tostring and... why the (i).." : "..v) ? |
|
|
| Report Abuse |
|
|
Valaxia
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 73 |
|
| |
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:27 PM |
| Nevermind. You may think I'm stupid, but that was still way over my head. I need to do some learning. :/ |
|
|
| Report Abuse |
|
|
Valaxia
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 73 |
|
| |
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:30 PM |
| Hmm... Hey... I know you're a new user and all, so you might not know the jetpack script (you can search it in free models) but could you take a look at my thread "I seriously need SOMEONE to respond with some help!"? No one has been helpful :/ You too Knightmare? :D |
|
|
| Report Abuse |
|
|
Valaxia
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 73 |
|
| |
|
|
| 28 Mar 2012 09:32 PM |
@Val
I could definitely tell... :P
† KMXD † |
|
|
| Report Abuse |
|
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:32 PM |
| @Valaxia... That sounded kinda condescending :( W/e... You're right though. It's just I try the ROBLOX wiki and stuff and they go straight from explaining layers of the game like game>Workspace>MattJon>Head etc. into scripting stuff I can't understand :/ |
|
|
| Report Abuse |
|
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:33 PM |
| It said you joined yesterday... :/ March 27, 2012... ? |
|
|
| Report Abuse |
|
|
Valaxia
|
  |
| Joined: 27 Mar 2012 |
| Total Posts: 73 |
|
| |
|
MattJon
|
  |
| Joined: 28 Apr 2009 |
| Total Posts: 660 |
|
|
| 28 Mar 2012 09:37 PM |
| Ah... BTW I responded on my other thread... |
|
|
| Report Abuse |
|
|