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 » Scripting Helpers
Home Search
 

Re: An Easy Way to Group Bricks?

Previous Thread :: Next Thread 
Perci1 is not online. Perci1
Joined: 24 Jan 2011
Total Posts: 1027
25 Mar 2014 11:17 AM
Obviously you could create a model, then put a bunch of bricks inside of it, but is there an easier way to group bricks?
Report Abuse
Perci1 is not online. Perci1
Joined: 24 Jan 2011
Total Posts: 1027
25 Mar 2014 11:18 AM
I mean with scripting, not by pressing control g.
Report Abuse
roboslayer10 is not online. roboslayer10
Joined: 08 Aug 2011
Total Posts: 206
25 Mar 2014 11:25 AM
m = Instance.new("Model",workspace)

for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Part") then
v.Parent = m
end
end
Report Abuse
Perci1 is not online. Perci1
Joined: 24 Jan 2011
Total Posts: 1027
25 Mar 2014 11:28 AM
Aww man, I was afraid I'd have to do that. I guess I should start naming the bricks I want to group.
Report Abuse
roboslayer10 is not online. roboslayer10
Joined: 08 Aug 2011
Total Posts: 206
25 Mar 2014 12:06 PM
you can specify which ones you want by using properties, name included

for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Part") then
if v.BrickColor == BrickColor.new("Bright green") then
-- grass
elseif v.BrickColor == BrickColor.new("Reddish brown") then
--dirt
end
end
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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