chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
|
| 06 Sep 2013 12:27 PM |
I have a scirpt like this: Part.CFrame = mouse.Hit But that sets the rotation too, and mouse.Hit rotation is really wierd. So anyway I can just set the Cframe position to mouse.Hit? |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 06 Sep 2013 12:30 PM |
| part.CFrame = CFrame.new(mouse.Hit.p) |
|
|
| Report Abuse |
|
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
| |
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
|
| 06 Sep 2013 01:04 PM |
| Well, that kind of worked but there is a problem. Now instead of keeping the old rotation it resets the rotation to 0. Is there anyway to fix this? |
|
|
| Report Abuse |
|
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
|
| 06 Sep 2013 01:30 PM |
Got it fixed. Here it is for anybody wondering: local x, y, z = script.Object.Value.Parent.MainPart.CFrame:toEulerAnglesXYZ() -----------The rest of the script script.Object.Value.Parent.MainPart.CFrame = CFrame.Angles(x,y,z) + (mouse.hit.p + Vector3.new(0,0.5,0))
|
|
|
| Report Abuse |
|
|