|
| 30 Jul 2011 07:02 PM |
| I keep forgetting how to create a brick to the left of another brick no matter its rotation. Anyone? |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:05 PM |
brick = Instance.new("Part") brick.Position + Vector3.new(5,0,0) brick.Size = Vector3.new(4,4,4) ? |
|
|
| Report Abuse |
|
|
landon90
|
  |
| Joined: 26 Dec 2008 |
| Total Posts: 1847 |
|
|
| 30 Jul 2011 07:08 PM |
I think this may work
block = Instance.new("Part") block.Position = game.Workspace.OTHERBRICKNAME.Position block.Size = game.Workspace.OTHERBRICKNAME.Size |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:09 PM |
| Neither of those would work. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:11 PM |
Wait, try this, sorry.
otherbrick = brick = Instance.new("Part") brick.Position = otherbrick.Position + Vector3.new(5,0,0) brick.Size = Vector3.new(4,4,4) |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:12 PM |
Fixed version:
block = Instance.new("Part", Workspace) block.Position = game.Workspace.OTHERBRICKNAME.Position block.Size = game.Workspace.OTHERBRICKNAME.Size
@2nd poster lrn2scrpt |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:12 PM |
| No, no, those are both the same as the original 2... |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:14 PM |
| I made the part's parent Workspace which they didn't... |
|
|
| Report Abuse |
|
|
landon90
|
  |
| Joined: 26 Dec 2008 |
| Total Posts: 1847 |
|
|
| 30 Jul 2011 07:14 PM |
Oh I know what I forgot to do. I forgot to add in
block.Parent = game.Workspace |
|
|
| Report Abuse |
|
|
landon90
|
  |
| Joined: 26 Dec 2008 |
| Total Posts: 1847 |
|
|
| 30 Jul 2011 07:14 PM |
I think this may work
block = Instance.new("Part") block.Parent = game.Workspace block.Position = game.Workspace.OTHERBRICKNAME.Position block.Size = game.Workspace.OTHERBRICKNAME.Size
|
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:15 PM |
| You guys don't seem to understand what I'm asking for. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:16 PM |
Wait this should be better:
block = Instance.new("Part", Workspace) block.Size = Vector3.new(5,5,5) --Can be changed into anything. block.Position = game.Workspace.OTHERBRICKNAME.Position + Vector3.new(block.Size.X + 1, 0, 0) |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:16 PM |
| -.-'' he means copying the rotation of the other brick, it'll be exactly right next to it. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:17 PM |
He could had explained better...
block = Instance.new("Part", Workspace) block.Size = Vector3.new(5,5,5) --Can be changed into anything. block.CFrane = game.Workspace.OTHERBRICKNAME.CFrame + Vector3.new(block.Size.X + 1, 0, 0) |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:17 PM |
| Yeah, what unknown said. I couldn't think of a way to explain it better. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:18 PM |
Made a typo sorry.
block = Instance.new("Part", Workspace) block.Size = Vector3.new(5,5,5) --Can be changed into anything. block.CFrame = game.Workspace.OTHERBRICKNAME.CFrame + Vector3.new(block.Size.X + 1, 0, 0) |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:28 PM |
| This might be what I'm looking for... But what's the block.Size.X + 1 for? |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 07:28 PM |
b = BLOCK YOU WANT THE PART TO BE NEXT TO p = Instance.new("Part",workspace) p.CFrame = b.CFrame + Vector3.new(5,0,0) |
|
|
| Report Abuse |
|
|
| |
|
smurf279
|
  |
| Joined: 15 Mar 2010 |
| Total Posts: 6871 |
|
|
| 30 Jul 2011 08:04 PM |
Instance.new("Part", Workspace).CFrame = game.Workspace.OTHERBRICKNAME.CFrame + Vector3.new(5, 0, 0)
|
|
|
| Report Abuse |
|
|
| |
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 30 Jul 2011 08:42 PM |
local c = Workspace["Part"]:Clone() c.CFrame = Workspace["Part"].CFrame * CFrame.new(c.Size.x / 2, 0, 0) c.Parent = Workspace |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 09:37 PM |
I'll try that next, but what's the c.Size.x / 2 for? Oh, I think I get it now. I did't need that, but thanks anyway :P |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 30 Jul 2011 09:43 PM |
| Spectrum, yours worked. Thanks. |
|
|
| Report Abuse |
|
|