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
 

How to use cframe to move a given object in any direction

Previous Thread :: Next Thread 
MilkyWay01 is not online. MilkyWay01
Joined: 22 Feb 2010
Total Posts: 1049
21 Jul 2013 11:47 PM
One thing I've never understood is how to move things to a location other than an exact location, but a location say, 10 studs up from where they originally were. So, for example say there's a random brick at any location. How would a script work that moves the brick up exactly 10 studs?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Jul 2013 11:48 PM
part.Position = part.Position + Vector3.new(0, 10, 0)
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
21 Jul 2013 11:49 PM
part.CFrame = part.CFrame + Vector3.new(0, 10, 0)

That moves it up ten studs. If you want to move it ten studs depending on where the part's top is facing, then you'd do,

part.CFrame = part.CFrame*CFrame.new(0, 10, 0)
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