koen500
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 2277 |
|
|
| 14 Dec 2012 06:08 AM |
Well, I'm very sure it does exist.
Command and reaction:
>game.Lighting.GroupRegister:FindFirstChild(game.StarterGui.Gui.Edit.Name.Right.Text) 13:06:50.357 - game.Lighting.GroupRegister:FindFirstChild(game.StarterGui.:1: attempt to index field 'Right' (a nil value) 13:06:50.357 - Script "game.Lighting.GroupRegister:FindFirstChild(game.StarterGui.", Line 1 13:06:50.358 - stack end |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
koen500
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 2277 |
|
|
| 14 Dec 2012 06:48 AM |
| Name is a frame, right is a textbox. |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
| |
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 06:57 AM |
sorry ignore my last post
You don't know how to use findFirstChild. Give us the hierarchy of what you are after. |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 14 Dec 2012 07:01 AM |
-_- Jelly stop sposting if you've got nothing usefull to say... If you could help you'd see the problem in sec..:
name the frame 'name' instead of 'Name' and change that in your script too!
The propblem is thatthe code isnt looking for the frame called 'Name', but for the property called 'Name'. And the property 'Name' has no children...
~sycips~ |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 07:04 AM |
| Um, RBXLUA actually can read either. If you put a Child after the Name then it will look at the Object 'Name'. If you don't and just leave it as .Name, then it will look at the property. Know your stuff before you post.... |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 14 Dec 2012 07:09 AM |
| Know your own stuff. If you'd first test what I said, you'd see that you'll get the same error as him! So DON'T say I don't know 'my stuff' and test it first before you say I'm wrong! |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 07:12 AM |
IT WONT WORK AT ALL BECAUSE YOU CANT FIND TEXT. FINDFIRSTCHILD FINDS CHILDREN NOT PROPERTIES.
to access "Right" and the text they need:
game.Lighting:findFirstChild("Right",true).Text |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 07:12 AM |
| the true is the recursive boolean. If true it will look at all descendants. |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 14 Dec 2012 07:15 AM |
| -_- are you trolling or what? A text is a string value. :findFirstChild() tries to find an object with the same name as the string value you gave as argument... With other words, he wants to find an object in lighting with the same name as the gui object 'right'. Is that so hard to get? |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 07:16 AM |
| Maybe if you chose to explain that earlier? |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 07:16 AM |
| game.Lighting.GroupRegister:FindFirstChild(game.StarterGui.Gui.Edit["Name"].Right.Text) |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 14 Dec 2012 07:19 AM |
| maybe if you were so smart to get that earlier... Next time think about what you're saying dude... |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 07:22 AM |
| okey dokey. Sorry about that. I am very tired and very ill. Your solution works. |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 14 Dec 2012 07:30 AM |
no problem, I've seen you busy on this forum alot this hour (or something) reading long scripts and making alot of script for other people. It's ok to be tiered after that :) and I gotta say that you're a good scripter!
~sycips~ |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 07:58 AM |
| Thanks. We all make mistakes occasionally though eh? |
|
|
| Report Abuse |
|
|
|
| 14 Dec 2012 09:29 AM |
Since name is a property and in your case an object; do this:
game.Lighting.GroupRegister:FindFirstChild(game.StarterGui.Gui.Edit["Name"]Right.Text)
~ thedeathmaster01 | Scripter | Placemaker ~ |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 09:31 AM |
| Just copy my posts why don't you? |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 14 Dec 2012 09:40 AM |
| yes we do :) and OMG, NOOB COPY-PASTE! |
|
|
| Report Abuse |
|
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 14 Dec 2012 09:41 AM |
| He is a LuaLearner so that's what he does... |
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
| |
|