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 » Scripters
Home Search
 

Lost an item in workspace?

Previous Thread :: Next Thread 
Lapwn is not online. 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 is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
05 Oct 2013 02:46 PM
wrong forum
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
05 Oct 2013 02:47 PM
wat
Report Abuse
ghosen is not online. 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 is not online. Lapwn
Joined: 03 Jun 2012
Total Posts: 5975
05 Oct 2013 03:34 PM
@cntkillme How is this the wrong forum?
Report Abuse
As8D is not online. 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
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
05 Oct 2013 04:24 PM
Use descendant.Name
Report Abuse
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
05 Oct 2013 04:34 PM
item = "Sound"
print(game:FindFirstChild(item, true).Parent.Name)
Report Abuse
lordrambo is not online. 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 is not online. Lapwn
Joined: 03 Jun 2012
Total Posts: 5975
05 Oct 2013 05:23 PM
No, v.Parent would output workspace .-.
Report Abuse
mew903 is not online. 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 is not online. 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 is not online. Lapwn
Joined: 03 Jun 2012
Total Posts: 5975
05 Oct 2013 08:52 PM
It did work.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
05 Oct 2013 08:53 PM
I'm talking about mew's
Report Abuse
mew903 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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