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: How to make one object move to another with CFrame?

Previous Thread :: Next Thread 
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
05 Jul 2013 11:04 AM
I know how to move stuff around with CFrame, but what equation should I use to make brick1 move to brick 2 on a set path?
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
05 Jul 2013 11:49 AM
bump
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
05 Jul 2013 12:43 PM
game.Workspace.SimpleTutorialBrick.CFrame = CFrame.new(game.Workspace.OtherBrickForTutorial.Position)

it werks.
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
05 Jul 2013 12:44 PM
or

game.Workspace.SimpleTutorialBrick.CFrame = CFrame.newgame.Workspace.OtherBrickForTutorial.Position.CFrame

it werks bettah!
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
05 Jul 2013 12:45 PM
wait, that doesn't work XD

ATTEMPT NUMBAH 2

or

game.Workspace.SimpleTutorialBrick.CFrame = game.Workspace.OtherBrickForTutorial.Position.CFrame

it werks bettah!
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
05 Jul 2013 12:45 PM
Pretty sure he's asking about moving it slowly over time. In which case you'll need to do....

MATH!

*gasp*
*screams*
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
05 Jul 2013 12:45 PM
(Will contain errors)

local Origin = CFrame.new(Brick1, Brick2)
local Look = Origin.lookVector
Brick1.CFrame = CFrame.new(Origin.p + Look * increment) -- u supply increment.
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