|
| 01 Aug 2011 11:07 AM |
| How would I create a brick between two bricks where the top points to one brick and the bottom points to the other? |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 11:10 AM |
| ....... I dont think you need to script for that....... Just click build and move a brick into 2 bricks. :3 |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 01 Aug 2011 11:12 AM |
Use welds so that the bottom brick stays EXACTLY at the bottem.
OR Use a hinge for them to spin on. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 11:12 AM |
| Why do you keep posting on everyone's threads saying you don't know how to script, then try to help anyway? |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 01 Aug 2011 11:13 AM |
@New Stop giving useless advice will you?
2337 Posts! |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 11:14 AM |
| Your suggestion wasn't any more helpful, xvgigakid. |
|
|
| Report Abuse |
|
|
xvgigakid
|
  |
| Joined: 22 Jun 2008 |
| Total Posts: 4407 |
|
|
| 01 Aug 2011 11:20 AM |
How so? Im not talking about welds as in weld surfaces. Im talking about welds as in Insert>Object>Weld
You can take a brick thats in position (0,0,0) And use the weld to weld it to the brick. And set its position to (10,0,0)
NEXT take the first brick and move it up like 2 studs and the second brick will move 2 studs. The second brick will always keep its position to the first brick. Even rotating it, it will stay to the right of the brick for 10 studs away.
Now the other technique is putting a brick inbetween brick 1 and 2. And putting a brick with a hinge under it. THEN use bodyposition so that the brick is always trying to position its self to the player although the brick is welded to the middle part. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 11:23 AM |
| I don't think you understand what I'm asking for. I know what kind of script I'm looking for, I just don't know exactly what it looks like. I know there's someone on this forum who can help, I've had help with this kind of thing before. |
|
|
| Report Abuse |
|
|
| |
|
agent767
|
  |
| Joined: 03 Nov 2008 |
| Total Posts: 4181 |
|
|
| 01 Aug 2011 12:14 PM |
p1 = part1.Position p2 = part2.Position
local p = Instance.new("Part",workspace) p.formFactor = "Custom" p.Anchored = true p.Size = Vector3.new(1,1,(p1-p2).magnitude) p.CFrame = CFrame.new((p1+p2)/2,p2) |
|
|
| Report Abuse |
|
|
| |
|
agent767
|
  |
| Joined: 03 Nov 2008 |
| Total Posts: 4181 |
|
| |
|
|
| 01 Aug 2011 12:20 PM |
| Wow you guys need a lesson about efficiency there's a method called :Lerp() use it. |
|
|
| Report Abuse |
|
|
agent767
|
  |
| Joined: 03 Nov 2008 |
| Total Posts: 4181 |
|
|
| 01 Aug 2011 01:13 PM |
@RATEX wow it doesnt matter. both would do the exact same thing |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 01:15 PM |
| Except that :Lerp() is only one line. |
|
|
| Report Abuse |
|
|
agent767
|
  |
| Joined: 03 Nov 2008 |
| Total Posts: 4181 |
|
|
| 01 Aug 2011 01:17 PM |
yup try creating a brick using only 1 line
p.CFrame = CFrame.new((p1+p2)/2,p2) = p.CFrame = CFrame.new(p1:Lerp(p2,0.5))
and the first one is shorter :/ |
|
|
| Report Abuse |
|
|
agent767
|
  |
| Joined: 03 Nov 2008 |
| Total Posts: 4181 |
|
|
| 01 Aug 2011 01:18 PM |
wait now it works...
p.CFrame = CFrame.new((p1+p2)/2,p2) = p.CFrame = CFrame.new(p1:Lerp(p2,0.5),p2) |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 04:45 PM |
| I'll use the first one because it's apparently the same. Plus I've never heard of :Lerp() |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 04:47 PM |
lookVector. CFrame the brick. Reassign it's lookVector to point the way of the first brick. You didn't give enough information for us to help properly. In fact, I had to read your sentence 3 times slowly to understand it. x.x
@new, please leave. Do not attempt to help if you cannot script. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 04:51 PM |
| Agent, now that I take a closer look at your script, I don't think it's quite right. I need the top and bottom surfaces to be pointing towards the bricks. |
|
|
| Report Abuse |
|
|
agent767
|
  |
| Joined: 03 Nov 2008 |
| Total Posts: 4181 |
|
|
| 01 Aug 2011 04:58 PM |
p1 = workspace.start.Position p2 = workspace.goal.Position
local p = Instance.new("Part",workspace) p.formFactor = "Custom" p.Anchored = true p.Size = Vector3.new(1,(p1-p2).magnitude,1) p.CFrame = CFrame.new((p1+p2)/2,p2)*CFrame.Angles(math.pi/2, math.pi/2, math.pi) |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 05:25 PM |
| Can I tell which brick the top is facing and which brick the bottom is facing? Like, say the top face HAD to be pointed at brick Part2 and the bottom HAD to be facing brick Part1 (sorry for being so picky about this, but I really appreciate the help). |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Aug 2011 06:45 PM |
| Bump of needing the top of part3 to be facing part2... |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 06:49 PM |
| Did you read dark's post. LookVector. |
|
|
| Report Abuse |
|
|