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
 

Re: remove brick5 until there are none left?

Previous Thread :: Next Thread 
sharpblaze2 is online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
22 May 2015 04:21 PM
i have a script that says for i = 1,50 then removes brick5

but there arent 50 brick5s, so how can i make it so that it deletes brick5 until there is none left
Report Abuse
sharpblaze2 is online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
22 May 2015 04:24 PM
bump
Report Abuse
Unplane is not online. Unplane
Joined: 24 Mar 2015
Total Posts: 38
22 May 2015 04:25 PM
Please restate this, Idk what you mean by this.

"i have a script that says for i = 1,50 then removes brick5

but there arent 50 brick5s, so how can i make it so that it deletes brick5 until there is none left"
Report Abuse
sharpblaze2 is online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
22 May 2015 04:29 PM
for i = 1,50 do
game.Workspace.brick5:remove()
end

there are 17 brick5 parts
i dont want to change it so that its for i = 1,17, i want a script where it removes parts named brick5 until there are none left
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
22 May 2015 04:31 PM
If you do i=1, 17 it should work.
Report Abuse
sharpblaze2 is online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
22 May 2015 04:31 PM
i dont want for i = 1,17, because there is another group of bricks that i need to remove and i really dont want to count them all
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
22 May 2015 04:32 PM
Why don't you just group the brick5 parts and destroy the model when you want.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
22 May 2015 04:32 PM
local model = somewhere

for _,v in ipairs(model:GetChildren())do
if v.Name == "brick5" then
v:Destroy()
end
end
Report Abuse
Unplane is not online. Unplane
Joined: 24 Mar 2015
Total Posts: 38
22 May 2015 04:33 PM
I DONT GET WHAT YOU ARE SAYING!?!?!?!!?!?

YOU ARE SAYING THAT THERE ARE ONLY 17 BRICK5's BUT YOU WANT TO REMOVE 50 OF THEM!?!?!?!?!? I DONT UNDERSTAND!?!!?!?!?!
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
22 May 2015 04:33 PM
Solution one:

Parent all of the bricks to a model
Use :GetChildren() on the model
Remove the parts


Solution two:

local Brick = game:FindFirstChild("brick5", true)

while Brick do
-- code
-- Set new Brick
end

I gave you the "hard" parts, 2 lines are easy..
You need to develop problem solving :-\
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
22 May 2015 04:33 PM
for i,v in pairs(game.Workspace:GetChildren()) do
if v.Name == "brick5" then
brick5:Destroy()
end
end
Report Abuse
Unplane is not online. Unplane
Joined: 24 Mar 2015
Total Posts: 38
22 May 2015 04:34 PM
@KLGA nice script copying skid.


You clearly copied Rayk's script and posted it for your own, It's like you want to feel imperial and be looked up to.

For some reason I never see that in the near future.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
22 May 2015 04:35 PM
You could do that too, but I don't know the creator doesn't like models.
So if there are 1000 parts; have fun with that.
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
22 May 2015 04:35 PM
@Ryak right after I posted it lol
Report Abuse
sharpblaze2 is online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
22 May 2015 04:37 PM
@unplane

everyone else understands what im saying

anyways, the bricks arent in a model
they're spread out separately in workspace
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
22 May 2015 04:38 PM
@unplane
thanks, my man.
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
22 May 2015 04:38 PM
Put them in a model then...
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
22 May 2015 04:39 PM
By separately, I assume in other models.
So use mine.
Report Abuse
sharpblaze2 is online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
22 May 2015 04:42 PM
there are no models
Report Abuse
Tokimonu is not online. Tokimonu
Joined: 18 Sep 2009
Total Posts: 643
22 May 2015 04:43 PM
unplane is salty he can't script


checkm8
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
22 May 2015 04:44 PM
Sharp, you can make them models yourself...
Report Abuse
sharpblaze2 is online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
22 May 2015 04:46 PM
i dont want to make the models
the bricks are created in a script, and i dont know how to put them in models NOR feel the need to when i can simply use a script you're refusing to give me
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
22 May 2015 04:47 PM
It's harder when you have different sets of bricks that YOU don't want to count.
Report Abuse
sharpblaze2 is online. sharpblaze2
Joined: 22 Aug 2010
Total Posts: 19195
22 May 2015 04:48 PM
i wont count them because i can use a script
that you're refusing to give me [2]
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
22 May 2015 04:54 PM
while workspace:FindFirstChild("brick5") do
workspace:FindFirstChild("brick5"):Destroy()
end

That was easy.
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