generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: This makes the arms move weird

Previous Thread :: Next Thread 
Tripane is not online. 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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
07 Apr 2015 06:04 PM
Bump
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
07 Apr 2015 06:06 PM
Use mouse.UnitRay
Report Abuse
Tripane is not online. 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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
07 Apr 2015 06:25 PM
Bump
Report Abuse
rayk999 is not online. 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 is not online. 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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
07 Apr 2015 08:30 PM
Bump
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
07 Apr 2015 10:25 PM
Bump
Report Abuse
Tripane is not online. 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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
08 Apr 2015 08:27 AM
Bump
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
08 Apr 2015 08:52 AM
Bump -_-
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
08 Apr 2015 08:53 AM
Bump c;


Total Posts: 404 ---------- Not Found
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
08 Apr 2015 09:04 AM
why must you guys ignore me
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
08 Apr 2015 09:38 AM
Bump
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
08 Apr 2015 10:56 AM
oh my god -_-
Report Abuse
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
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 is not online. 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
buildersteven4 is not online. buildersteven4
Joined: 08 May 2009
Total Posts: 1325
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 is not online. 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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
08 Apr 2015 11:27 PM
Oh my godm come on
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
09 Apr 2015 01:18 PM
-_-
Report Abuse
robocu3 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image