Provix101
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 313 |
|
|
| 31 Jul 2014 09:39 PM |
it rains bricks.
I am trying to remove the brick it spawns
so if it spawns 1 brick a second
there a 4 bricks 4 different colors each brick of the 4 is differently named
so i try to destroy each brick every 3 seconds before a new one of that color spawns in 4 seconds
repeat if a == 1 then wait(3) game.Workspace.one1Destroy() end until a == 2
well apparently that doesn't work so what do I do?
that is suppose to delete 1 color brick i did that 3 other times but one1 is named to the other bricks
|
|
|
| Report Abuse |
|
|
|
| 31 Jul 2014 09:43 PM |
repeat if a == 1 then wait(3) game.Workspace.one1:Destroy() end until a = 2
I'm a beginner but try that out. |
|
|
| Report Abuse |
|
|
Provix101
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 313 |
|
|
| 31 Jul 2014 09:51 PM |
@above it errors at one = sign where I had 2 and I made a typo with the missing :
but it still doesnt work. |
|
|
| Report Abuse |
|
|
Provix101
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 313 |
|
| |
|
|
| 31 Jul 2014 10:16 PM |
put the bricks into a model
for _, v in pairs(game.Workspace.Model:GetChildren()) do if v.ClassName == "Part" then wait(3) v:remove() end end
Outfoxing Foxes |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
| |
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
|
| 31 Jul 2014 10:35 PM |
| Is this a segment of a script? Posting the other important parts helps. "a" isn't even defined. |
|
|
| Report Abuse |
|
|
Provix101
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 313 |
|
|
| 31 Jul 2014 11:56 PM |
whole script:
a = 1
repeat local Brick = Instance.new("Part", Workspace) Brick.BrickColor = BrickColor.new("Bright red") Brick.Position = Vector3.new (0, 162.4, 0) Brick.Name = "one1" wait(1) local Brick = Instance.new("Part", Workspace) Brick.BrickColor = BrickColor.new("Bright green") Brick.Position = Vector3.new (0, 162.4, -5.4) Brick.Name = "one2" wait(1) local Brick = Instance.new("Part", Workspace) Brick.BrickColor = BrickColor.new("Bright blue") Brick.Position = Vector3.new (0, 162.4, -10) Brick.Name = "one3" wait(1) local Brick = Instance.new("Part", Workspace) Brick.BrickColor = BrickColor.new("Bright yellow") Brick.Position = Vector3.new (0, 162.4, -15.4) Brick.Name = "one4" wait(1) until a == 2
repeat if a == 1 then wait(3) game.Workspace.one1:Destroy() end until a == 2
repeat if a == 1 then wait(3) game.Workspace.one2:Destroy() end until a == 2
repeat if a == 1 then wait(3) game.Workspace.one3:Destroy() end until a == 2
repeat if a == 1 then wait(3) game.Workspace.one1:Destroy() end until a == 2 |
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 01 Aug 2014 12:00 AM |
repeat local Brick1 = Instance.new("Part", Workspace) Brick.1BrickColor = BrickColor.new("Bright red") Brick1.Position = Vector3.new (0, 162.4, 0) Brick1.Name = "one1" wait(3) Brick1:Destroy() local Brick 2= Instance.new("Part", Workspace) Brick2.BrickColor = BrickColor.new("Bright green") Brick2.Position = Vector3.new (0, 162.4, -5.4) Brick2.Name = "one2" wait(3) Brick2:Destroy() local Brick3= Instance.new("Part", Workspace) Brick3.BrickColor = BrickColor.new("Bright blue") Brick3.Position = Vector3.new (0, 162.4, -10) Brick3.Name = "one3" wait(3) Brick3:Destroy() local Brick4 = Instance.new("Part", Workspace) Brick4.BrickColor = BrickColor.new("Bright yellow") Brick4.Position = Vector3.new (0, 162.4, -15.4) Brick4.Name = "one4" Brick4:Destroy() wait(3) until a == 2 |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2014 12:08 AM |
| you made it 10x harder then it needs to be. |
|
|
| Report Abuse |
|
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
| |
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
|
| 01 Aug 2014 12:17 AM |
local Brick = Instance.new("Part", Workspace) Brick.BrickColor = BrickColor.new("Bright red") Brick.Position = Vector3.new (0, 162.4, 0) Brick.Name = "one1" wait(1) local Brick = Instance.new("Part", Workspace) Brick.BrickColor = BrickColor.new("Bright green") Brick.Position = Vector3.new (0, 162.4, -5.4) Brick.Name = "one2" wait(1) local Brick = Instance.new("Part", Workspace) Brick.BrickColor = BrickColor.new("Bright blue") Brick.Position = Vector3.new (0, 162.4, -10) Brick.Name = "one3" wait(1) local Brick = Instance.new("Part", Workspace) Brick.BrickColor = BrickColor.new("Bright yellow") Brick.Position = Vector3.new (0, 162.4, -15.4) Brick.Name = "one4" wait(1)
Pos = {Vector3.new(0, 162.4, 0), Vector3.new(0, -5.5, 0)} Colors = {"Bright red", "Bright green", "Bright blue", "Bright yellow"} Current = 1 while true do local Part = Instance.new("Part", Workspace) Part.BrickColor = Colors[Current] Part.Position = Pos[1] + Pos[2] * (Current - 1) Part.Name = "one" ..Current game:GetService("Debris"):AddItem(Part, 3) Current = Current + 1 if Current == 5 then Current = 1 end wait(1) end |
|
|
| Report Abuse |
|
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
|
| 01 Aug 2014 12:18 AM |
I meant to take the top part out of my post, that was only for reference. Everything past the gap is the script I turned it into. Enjoy. |
|
|
| Report Abuse |
|
|