|
| 01 Feb 2015 11:03 AM |
PUnderbarrel.Base.CFrame = CFrame.new(primary.UnderbarrelBase.Position) * CFrame.Angles(primary.UnderbarrelBase.Rotation)
What is wrong with this line of code? The error says something about bad argument #1 |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Feb 2015 11:13 AM |
I think I found the problem:
PUnderbarrel.Base.CFrame = CFrame.new(primary.Underbarrel.Base.Position) * CFrame.Angles(primary.Underbarrel.Base.Rotation) |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 08:30 AM |
| No, my hierarchy was correct. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 02 Feb 2015 09:40 AM |
It's possible that CFrame.Angles doesn't accept a vector as an argument. And anyway, part.Rotation is in degrees, not radians like CFrames.
Moreover, if you're multiplying the position and rotation parts of the same matrix together you're going to get the original thing. Why not just do
PUnderbarrel.Base.CFrame = primary.UnderbarrelBase.CFrame
|
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 09:44 AM |
I thought it would error because I tried something similar that did error. :/ Thanks so much! |
|
|
| Report Abuse |
|
|