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