Check out the CFrame page on the wiki while/after reading this answer:
http://wiki.roblox.com/index.php?title=CFrame
CFrames are tricky. If you're trying to put a CFrame with a CFrame, you HAVE to multiply; this is the case when doing CFrame.Angles. (You can still add or subtract a Vector3 to/from CFrames without incident.)
so the way I would go about doing this, in steps, is
- take the original position of the arm
- either:
A. State a new cframe with "leftarmweld.C0 = CFrame.new(yourX,yourY, yourZ)"
B. Start with the original arm position and add a vector3 to offset it. "C0 = C0 +Vector3.new(x,y,z)"
then
- Multiply that by the CFrame.Angles you want.
Here's an example.
This code takes the arm, and moves it one stud above where it already is, turning it to face up 90 degrees. it'll probably look ridiculous, but whatever! So long as it works!
1 | leftarmweld.C 0 = leftarmweld.C 0 * CFrame.Angles(math.rad( 90 ), 0 , 0 ) + Vecor 3. new( 0 , 1 , 0 ) |
let me know if there's any problems and i'll make a comment correcting any mistakes