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
 

CFraming help.

Previous Thread :: Next Thread 
GuestCapone is not online. GuestCapone
Joined: 19 Oct 2012
Total Posts: 1928
16 Nov 2014 04:08 PM
Okay, lets say a Ray hit an object that is at Vector3.new(0,10,0) and the part is rotated Vector3.new(25,60,1), and that the Ray's Hit.Position is as Vector3(10,10,10),


Now, we spawn a part at Vector3.new(10,10,10), by default the newly spawned part's rotation is Vector3(0,0,0), however the part that the ray hit's rotation is Vector3(25,60,1).

Now I need to make the newly spawned part's rotation match hitted part's rotation but have the position of where the ray hit, and then I also need to add 90 degrees to the local X axis of the newly spawned part, while keeping its position... How to do this?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
16 Nov 2014 04:14 PM
Part.CFrame = CFrame.new(Position) * CFrame.Angles(math.rad(Hit.Rotation.X), math.rad(Hit.Rotation.Y), math.rad(Hit.Rotation.Z))
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