|
| 13 Apr 2014 10:22 PM |
Hi, im making a tycoon and i am using a selection box on some bricks. I have a four bricks, each with a different color of selection box and each with its own name.(Cube1, Cube2 etc) I ran the studio and it worked very well
But i need to group them all together...When i group them the selection boxes dont appear? Why is that? Heres the script
selBox = Instance.new("SelectionBox",game.Workspace.Cube1) selBox.Color = BrickColor.new("Lime green") selBox.Adornee=game.Workspace.Cube1
|
|
|
| Report Abuse |
|
|
2unknown2
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 9351 |
|
|
| 13 Apr 2014 10:23 PM |
| What do you mean by group? |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 10:25 PM |
| By group i mean i select all them and make it a model. |
|
|
| Report Abuse |
|
|
2unknown2
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 9351 |
|
|
| 13 Apr 2014 10:27 PM |
oh lol
for i,v in pairs(game.workspace.Model:GetChildren()) do if v.ClassName == "Part" then sb = Instance.new("SelectionBox",v) sb.Adornee = v sb.Color = BrickColor.new("Bright blue") end end |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 10:31 PM |
Im very new to scripts so i got a few questions about that the "Part", would i change that to the bricks name(Cube1)? |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2014 11:03 PM |
| No, the v.ClassName == "Part" line just checks if it's a part or not. |
|
|
| Report Abuse |
|
|