Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
|
| 31 Aug 2013 12:18 PM |
I have an object in a Player called "TruckData".
When I do
TruckData.ChildAdded:connect(function() print("test") end)
and then
Instance.new("BoolValue",TruckData)
It doesn't work. It only works when I clone it and add it from studio in Test > Play Solo |
|
|
| Report Abuse |
|
|
Xtreme101
|
  |
| Joined: 03 Jan 2009 |
| Total Posts: 4385 |
|
|
| 31 Aug 2013 12:20 PM |
You have to locate TruckData in the line
Instance.new("BoolValue",TruckData)
You can't expect the computer to automatically find it. |
|
|
| Report Abuse |
|
|
Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
|
| 31 Aug 2013 12:23 PM |
| TruckData is a variable. The Instance DOES get added, but ChildAdded doesn't get called. |
|
|
| Report Abuse |
|
|
Xtreme101
|
  |
| Joined: 03 Jan 2009 |
| Total Posts: 4385 |
|
|
| 31 Aug 2013 12:24 PM |
| Well then no child has been added. Derp |
|
|
| Report Abuse |
|
|
Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
|
| 31 Aug 2013 12:26 PM |
| No, it was added, but I have updates on the issue. It prints when a Child is added, but when I check it's name, it doesn't work unless I clone it into TruckData. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2013 12:28 PM |
| Where are both pieces of code located? |
|
|
| Report Abuse |
|
|
Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
|
| 31 Aug 2013 12:30 PM |
| Nevermind, issue solved. -.-" |
|
|
| Report Abuse |
|
|
jobro13
|
  |
| Joined: 05 Aug 2009 |
| Total Posts: 2865 |
|
|
| 31 Aug 2013 12:33 PM |
| Read my workaround on the Scripters topic. (Next time, don't post two topics, please..) |
|
|
| Report Abuse |
|
|