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: Selection box script question

Previous Thread :: Next Thread 
crazytanker is not online. crazytanker
Joined: 30 Nov 2010
Total Posts: 5285
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 is not online. 2unknown2
Joined: 30 Oct 2011
Total Posts: 9351
13 Apr 2014 10:23 PM
What do you mean by group?
Report Abuse
crazytanker is not online. crazytanker
Joined: 30 Nov 2010
Total Posts: 5285
13 Apr 2014 10:25 PM
By group i mean i select all them and make it a model.
Report Abuse
2unknown2 is not online. 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
crazytanker is not online. crazytanker
Joined: 30 Nov 2010
Total Posts: 5285
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
Lamboreborn is not online. Lamboreborn
Joined: 19 Jun 2009
Total Posts: 191
13 Apr 2014 11:03 PM
No, the v.ClassName == "Part" line just checks if it's a part or not.
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