Lapwn
|
  |
| Joined: 03 Jun 2012 |
| Total Posts: 5975 |
|
|
| 05 Oct 2013 02:45 PM |
for i,v in pairs(workspace:GetChildren()) do if v:findFirstChild("Sound")~=nil then print("I'm in"..v.Name.."ok?") end end
Idk I'm new and this worked so I'm happy. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
| |
|
ghosen
|
  |
| Joined: 22 Feb 2011 |
| Total Posts: 28 |
|
|
| 05 Oct 2013 03:01 PM |
How can you lose an item in Workspace? IT'S IN WORKSPACE AND IT'S FINDABLE BY SCROLLING.
~Tanner L. Ghosen~ |
|
|
| Report Abuse |
|
|
Lapwn
|
  |
| Joined: 03 Jun 2012 |
| Total Posts: 5975 |
|
|
| 05 Oct 2013 03:34 PM |
| @cntkillme How is this the wrong forum? |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 05 Oct 2013 03:51 PM |
^ I ask the same question as people other than OP.
Well, you can do :FindFirstChild(string Name, boolean Recursive). Then you can do :GetFullName() to get the full location.
Also, post such stuff in Scripting Helpers (SH)
- As, darkness is born from tortured sea slugs. They spit it out and you eat it after dinner. Nomnom. |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Oct 2013 04:34 PM |
item = "Sound" print(game:FindFirstChild(item, true).Parent.Name) |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 05 Oct 2013 04:40 PM |
I think you meant to have your third line be: print("I'm in"..v.Parent.Name.."ok?")
but if it's "lost in workspace" and is sorting through the workspace (not it's decedents) then you probably don't need this. |
|
|
| Report Abuse |
|
|
Lapwn
|
  |
| Joined: 03 Jun 2012 |
| Total Posts: 5975 |
|
|
| 05 Oct 2013 05:23 PM |
| No, v.Parent would output workspace .-. |
|
|
| Report Abuse |
|
|
mew903
|
  |
| Joined: 03 Aug 2008 |
| Total Posts: 22071 |
|
|
| 05 Oct 2013 08:37 PM |
print(table.concat(Workspace:GetChildren(), '\n'));
Because I'm that cool to provide an alternative |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 05 Oct 2013 08:51 PM |
That won't work.
You need to use unpack |
|
|
| Report Abuse |
|
|
Lapwn
|
  |
| Joined: 03 Jun 2012 |
| Total Posts: 5975 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
mew903
|
  |
| Joined: 03 Aug 2008 |
| Total Posts: 22071 |
|
|
| 05 Oct 2013 09:10 PM |
Okay FINE
print(table.concat((function(t)for i = 1, #t do t[i] = tostring(t[i]); end; return t; end)(Workspace:GetChildren()), '\n')); |
|
|
| Report Abuse |
|
|