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 » Scripting Helpers
Home Search
 

Re: trying to make my arms point at the mouse

Previous Thread :: Next Thread 
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
21 Jul 2014 01:33 PM
Title.

As you can see, I am horrible at math. I'm trying to use weld to move my arms to point at the mouse.


wait(3)workspace.Player1.Torso.Weld.C1 = CFrame.new(-0.249, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(280), math.rad(0), math.rad(-90)) * CFrame.new(workspace.Player1["Right Arm"].Position, Game.Players.LocalPlayer:GetMouse().Hit.p)

any help would be appreciated.
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
21 Jul 2014 01:34 PM
Whoops. Wrong code.


while wait() do -- for testing purposes

Weld.C1 = CFrame.new(-0.249, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(280), math.rad(0), math.rad(-90)) * CFrame.new(workspace.Player1["Right Arm"].Position, Game.Players.LocalPlayer:GetMouse().Hit.p)

end
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
21 Jul 2014 01:41 PM
Bump.

Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
21 Jul 2014 01:57 PM
B#2
Report Abuse
CWRA0444 is not online. CWRA0444
Joined: 14 Jan 2010
Total Posts: 6013
21 Jul 2014 02:03 PM
I don't think anyone here is good at math
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
21 Jul 2014 02:05 PM
Ik that CntKillMe is
Report Abuse
CWRA0444 is not online. CWRA0444
Joined: 14 Jan 2010
Total Posts: 6013
21 Jul 2014 02:08 PM
I'm a relatively new scripter but try something with LookVector
Report Abuse
KAAK82 is not online. KAAK82
Joined: 06 May 2014
Total Posts: 1166
21 Jul 2014 02:29 PM
there already is a Joint for the Arm so if u want to Rotate and keep it stuck to the Torso I wouldn't say u need it, and about the Math, u dont need that if u use Arm.CFrame.p, mouse.Hit.p or Arm.Position, mouse.Hit.p. cos it's already doin all the stuff, so am guessing u want it to be facing, well, not straight at the Mouse? cos if u want straight at the Mouse then u dont need the Math (Unless of course the Arm's Front face is the Long Face, so if it is the long face that is the Front Face then, just configure the Shoulder
rshoulder.C0 = rshoulder.C0 * CFrame.Angles(0, 0, 1) --I think it's the last one that needs to be a '1'
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
21 Jul 2014 04:12 PM
b#3
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 04:37 PM
B#4
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
22 Jul 2014 04:40 PM
while wait() do
WeId.C1 = CFrane.new(-0.249, 1.35, 0.6) * CFrema.fromEulerAnglesXYZ(math.sin(280), moth.rad(0), math.abs(-90)) * CFrame.new(workspace.PIayer1["Right Arm"].Position, Game.PIayers.LocaIPIayer:GetMouse().Hit.p)
end
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 04:52 PM
After fixing the errors that you left in the script to troll me, The script did not work, and in fact sent my arm flying through the sky. Any Ideas?
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 05:06 PM
Bump#5
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 05:15 PM
Bump

I suck at CFraming.

Obviously.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
22 Jul 2014 05:17 PM
not even cframing -___-
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 05:19 PM
Yes it is.


The C1 and C0 Property is the CFrame given for the Two parts in a weld.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
22 Jul 2014 05:19 PM
There is no weld in Torso named "Weld" but there is Right and Left Shoulders, if you want to edit that
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
22 Jul 2014 05:20 PM
no its not
it's the amount before the object explodes -____-
read a tutorial plz
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 05:21 PM
The weld has been created by a script earlier.
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 05:31 PM
Bump

Please, i've been working on this for days.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
22 Jul 2014 05:32 PM
thats sad lol

just change the position

arm.Position = CFrame.new().p.lookVector.magnitude
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 05:41 PM
facepalm.
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
22 Jul 2014 05:41 PM
Did you really think that would work? or are you just trolling?



[floodcheck]
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
22 Jul 2014 05:43 PM
What the heck did you just say about me, you little newbag? I’ll have you know I graduated top of my rank at F.E.A.R, and I’ve been involved in numerous secret raids on VAK, and I have over 300 confirmed KO's. I am trained in shift-click sword warfare and I’m the top bloxxer on SFOTH. You are nothing to me but just another target. I will wipe you out with precision the likes of which has never been seen before on this Earth, mark my words. You think you can get away with saying that to me over the forums? Think again, nerd. As we speak I am contacting my secret network of online girlfirends across the site and your IP is being traced right now so you better prepare for the pass guess , maggot. The storm that wipes out the pathetic little thing you call your account . You’re fricking shadowbanned, kid. I can be anywhere, anytime, and I can blox you in over seven hundred ways, and that’s just before you can say "oof"! Not only am I extensively trained in bunny hopping and strafing, but I have access to the entire arsenal of the ROBLOX Catalog and I will use it to its full extent to wipe your miserable life off the face of the forums, you child . If only you could have known what unholy retribution your little “clever” comment was about to bring down upon you, maybe you would have held your witty reply to my thread . But you couldn’t, you didn’t, and now you’re paying the price, you idiot. I will shoot fury all over you and you will drown in it. You’re fricking dead, kiddo.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
22 Jul 2014 05:43 PM
XD
it works because I just tested it

maybe u dont no what ur doing!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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