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: Creating a brick between two bricks

Previous Thread :: Next Thread 
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
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
newfyworld is not online. newfyworld
Joined: 16 Jul 2011
Total Posts: 89
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 is not online. 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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
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 is not online. 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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
01 Aug 2011 11:14 AM
Your suggestion wasn't any more helpful, xvgigakid.
Report Abuse
xvgigakid is not online. 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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
01 Aug 2011 12:10 PM
Bump.
Report Abuse
agent767 is not online. 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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
01 Aug 2011 12:15 PM
Thanks.
Report Abuse
agent767 is not online. agent767
Joined: 03 Nov 2008
Total Posts: 4181
01 Aug 2011 12:18 PM
did it work? :o
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
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 is not online. 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
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
01 Aug 2011 01:15 PM
Except that :Lerp() is only one line.
Report Abuse
agent767 is not online. 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 is not online. 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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
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
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
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 is not online. 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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
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
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
01 Aug 2011 06:22 PM
Bump.
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
01 Aug 2011 06:45 PM
Bump of needing the top of part3 to be facing part2...
Report Abuse
EpikYummeh is not online. EpikYummeh
Joined: 05 Sep 2009
Total Posts: 1879
01 Aug 2011 06:49 PM
Did you read dark's post. LookVector.
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