Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 07 Apr 2015 05:30 PM |
mouse.Move:connect(function() local t = c:FindFirstChild("Torso") local la = c:FindFirstChild("Left Arm") local ra = c:FindFirstChild("Right Arm") if t then local weld1 = t:FindFirstChild("weld_1") if weld1 then weld1.C1 = (cf(ra.Position, mouse.Hit.p)):toObjectSpace(t.CFrame * weld1.C0) end local weld2 = t:FindFirstChild("weld_2") if weld2 then weld2.C1 = (cf(la.Position, mouse.Hit.p)):toObjectSpace(t.CFrame * weld2.C0) end end end)
There's a weld inside the torso for each arm, and I want the arms to move up and down based on the mouse's position while still remaining at their general positions |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 07 Apr 2015 06:15 PM |
where should I put that
what does it do
you can't just go around telling people to use concepts out of the blue, sir |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 07 Apr 2015 06:29 PM |
| mouse.UnitRay is a ray that starts from your camera and goes to wherever your mouse is. |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 07 Apr 2015 06:34 PM |
But that's not a Vector3, how would I apply it to the script
And would it fix my problem with the weld positions? |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 07 Apr 2015 10:37 PM |
Bumps are underpowered, buff pls
But seriously, is there a way to only get this to work on the y axis? Because this moves your arms around on every axis instead of up and down |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
|
| 08 Apr 2015 08:53 AM |
Bump c;
Total Posts: 404 ---------- Not Found |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 08 Apr 2015 09:04 AM |
| why must you guys ignore me |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2015 09:06 AM |
I can't help at the moment D:
Studio not available for me right now
Total Posts: 404 ---------- Not Found |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
|
| 08 Apr 2015 11:00 AM |
http://wiki.roblox.com/index.php?title=Ray
you'd wan't to to use the Direction property of the of the ray. then you get the direction in a vector3 |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 08 Apr 2015 12:08 PM |
But I don't need rays for this
And even if I do, a random wiki link isn't going to help me, I don't know where to put what you want me to put |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2015 01:31 PM |
| The ray is directed the way the mouse is "directed". If you take the direction of the ray you can use it to calculate the rotation the arm should have. |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 08 Apr 2015 08:06 PM |
| But how? I don't use rays, and I honestly don't want to rewrite the whole script guessing if it's right or not |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 09 Apr 2015 01:24 PM |
he literally told you how to do it, use rays stop bumping
-=Robo=- |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 09 Apr 2015 01:30 PM |
you imply that I know what he means by use rays
i still dont know what to put
i looked at the wiki page and still dont know what to do |
|
|
| Report Abuse |
|
|