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: CFrame

Previous Thread :: Next Thread 
AStoryUntold is not online. AStoryUntold
Joined: 09 Mar 2013
Total Posts: 237
02 Jul 2016 06:02 PM
How would you make a part that connects 2 points?

Example:
Point A = (34, 45, 109)
Point B = (21, 43, 65)
One end of the part would be touching point A and the other end would be touching point B.
Report Abuse
AStoryUntold is not online. AStoryUntold
Joined: 09 Mar 2013
Total Posts: 237
02 Jul 2016 06:36 PM
bump
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
02 Jul 2016 06:37 PM
math.atan


Report Abuse
AStoryUntold is not online. AStoryUntold
Joined: 09 Mar 2013
Total Posts: 237
03 Jul 2016 03:46 PM
bump
Report Abuse
Slydexia is not online. Slydexia
Joined: 10 Aug 2010
Total Posts: 98517
03 Jul 2016 04:06 PM
Distance = (Point A - Point B).magnitude
part.CFrame = CFrame.new(Point A, Point B) + CFrame.new(Point A, Point B).lookVector * Distance/2
part.Size = Vector3.new(1,1,Distance)

there's probably some super short nerd way of doing it too but this is what i assumed you asked for
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
03 Jul 2016 04:23 PM
Distance = (PointA - PointB).magnitude
part.Size = Vector3.new(1, 1, Distance)
part.CFrame = CFrame.new(PointA, PointB) * CFrame.new(0, 0, -Distance/2)
Report Abuse
Slydexia is not online. Slydexia
Joined: 10 Aug 2010
Total Posts: 98517
03 Jul 2016 04:27 PM
looks like we can't get shorter than jarod's method so i guess i'm on the right track
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