|
| 15 Aug 2013 10:54 AM |
I tried using this:
CFrame.new(Vector3.new(CFrame.x,CFrame.y,CFrame.z),Vector3.new(mouse.Hit.X,Mouse.Hit.Y,Mouse.Hit.Z))
But the arms just ended up killing the character, any ideas? |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 11:01 AM |
Not sure if this'll work, but try this:
CFrame.new(arm.CFrame.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(90))
Replace 'arm' with a reference to the arm. Obviously one for left and one for right, too. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 11:56 AM |
| Um, ok, I think I'll try connecting that to the Mouse.Move event. |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 12:02 PM |
12:02:28.994 - maximum event re-entrancy depth exceeded
mouse.Move:connect(function() rs.C0 = CFrame.new(arm.CFrame.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(105)) ls.C0 = CFrame.new(arm.CFrame.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(-100)) end) end) |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 12:08 PM |
Tried doing this but it still doesn't work
mousemove = false
mouse.Move:connect(function() if mousemove == false then mousemove = true rs.C0 = CFrame.new(arm.CFrame.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(105)) ls.C0 = CFrame.new(arm.CFrame.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(-100)) mousemove = false end end) |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 12:27 PM |
| maybe add a wait() at beginning of Move Event? |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 12:31 PM |
| Nope, didn't work, stumped. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 15 Aug 2013 01:27 PM |
Still not working, btw I have rs and ls defined as Right Shoulder and Left Shoulder Motor6D's.
mouse.Move:connect(function() if mousemove == false then mousemove = true wait(0.025) rs.C0 = CFrame.new(rs.C0.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(105)) ls.C0 = CFrame.new(ls.C0.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(-100)) mousemove = false end end) |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 02:03 PM |
| Any ideas about that error I got? |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 15 Aug 2013 02:36 PM |
function lajoijigpoiqhgkngkngoigniwgn(mouse) -- If it's in a hopperbin... mouse.Move:connect(function() if mousemove == false then mousemove = true wait(0.025) rs.C0 = CFrame.new(rs.C0.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(105)) ls.C0 = CFrame.new(ls.C0.p, mouse.Hit.p)*CFrame.Angles(0, 0, math.rad(-100)) mousemove = false end end) end
script.Parent.Selected:connect(lajoijigpoiqhgkngkngoigniwgn) |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 02:52 PM |
C0 and C1 are offsets, not global positions and weld the arms to the head and rotate the head
local offset = CFrame.new(0, 1.5, 0) -- change this to the head's offset to the torso, i think this is right headweld.C1 = (CFrame.new(head.Position, m.Hit.lookVector) - head.Position) * offset |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2013 02:58 PM |
@FreeToTake
I would have to re-write my animations, and re-measure my welds to use that. |
|
|
| Report Abuse |
|
|
| |
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
|
| 15 Aug 2013 09:21 PM |
| was about to bump for you, because I, also, need this to work for my guns >.> |
|
|
| Report Abuse |
|
|
| |
|
johnhugh
|
  |
| Joined: 26 Mar 2009 |
| Total Posts: 1971 |
|
| |
|
|
| 16 Aug 2013 06:57 AM |
CFrame.new(start, end):toObjectSpace(Torso.CFrame)
Try that. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2013 10:31 AM |
| Could you explain that for me? I don't know what start, end is. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2013 10:38 AM |
| Start is your Left Arms (shoulders?) position, End is your mouse cursor. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2013 10:41 AM |
| Does the position show correctly if the Arms are welded? Because I only know their weld positions. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2013 10:55 AM |
| So would rarm.CFrame.p show the correct CFrame even if it was welded? Because usually the Position property looks like it doesn't change. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2013 10:58 AM |
| Yeah... Because the position property changes... |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2013 11:03 AM |
I've done this before, I think I know how to do it, but just let me find the gun I did it for to make sure.
- Bigbucks |
|
|
| Report Abuse |
|
|