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: help with arm movement

Previous Thread :: Next Thread 
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
15 Oct 2015 06:27 PM
runserv:BindToRenderStep('ArmUpdate',Enum.RenderPriority.Camera.Value,function()
local x,y,z,r1,r2,r3,r4,r5,r6,r7,r8,r9=camera.CoordinateFrame:components()
neck.C0=CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)*CFrame.Angles(math.asin(r6),0,0)
end)


This is what I have. It works, except when I look up, it gets closer to my screen, and when I look down, it gets further away. Any ideas?
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
15 Oct 2015 06:29 PM
most likely the arm is welded (by the default motor6D) to the torso
you're gonna have to recreate the weld except weld it to the HEAD instead


Red Blossoms
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
15 Oct 2015 06:32 PM
it is welded to the head.


below is the activation function. it disables the shoulder motor6ds

function ActivateArms()
local w1,w2=character['Right Arm']:FindFirstChild'Weld'or Instance.new('Weld',character['Right Arm']),character['Left Arm']:FindFirstChild'Weld'or Instance.new('Weld',character['Left Arm'])
local s1,s2=torso:WaitForChild'Right Shoulder',torso:WaitForChild'Left Shoulder'
w1.Part0=w1.Parent; w2.Part0=w2.Parent
w1.Part1=head; w2.Part1=head
s1.Part1=nil; s2.Part1=nil
w1.C0=CFrame.new(1.5,1.5,0); w2.C0=CFrame.new(-1.5,1.5,0)
w1.C1=RightPos; w2.C1=LeftPos
equipped=true
runserv:BindToRenderStep('ArmUpdate',Enum.RenderPriority.Camera.Value,function()
local x,y,z,r1,r2,r3,r4,r5,r6,r7,r8,r9=camera.CoordinateFrame:components()
neck.C0=CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)*CFrame.Angles(math.asin(r6),0,0)
end)
end
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
15 Oct 2015 06:43 PM
not sure what neck is


Red Blossoms
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
15 Oct 2015 06:45 PM
neck is neck motor located in torso
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
15 Oct 2015 06:58 PM
help me rayk plz
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
15 Oct 2015 07:18 PM
idk
i just welded them to the head and change the weld's c0
not the neck's c0

Red Blossoms
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
15 Oct 2015 07:30 PM
can u post what you did?

you created a new weld instead of the neck weld, and used that instead?
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
15 Oct 2015 07:36 PM
local neck=Instance.new('Weld',character.Torso); neck.Name='FakeNeck'; neck.Part0=head; neck.Part1=torso; neck.C0=CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)


replaced my neck variable with that. didnt seem 2 work
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
15 Oct 2015 07:43 PM
rayk isnt this your specialty lmao

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
MKofOrbiter is not online. MKofOrbiter
Joined: 28 Aug 2010
Total Posts: 910
15 Oct 2015 07:53 PM
I bet you rayk knows, he is just you know...
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
15 Oct 2015 08:34 PM
help guys plz
Report Abuse
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
15 Oct 2015 08:43 PM
Your changing the wrong variable, your math is right (technically but its god awful, (COMPARED to how much you actually know about cframe))

Anyway your Rotating AROUND the placement of the weld (c0), when you should be rotating around the camera, which is pretty darn close to the head, so what I would do is create an ENTIRE new weld and weld that to the head, and either ONLY change the C0 and leave the C1 nothing, or ONLY change the C1 and leave the C0 nothing
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
15 Oct 2015 09:01 PM
Ok I did that, but it's stuttery.

local client=game.Players.LocalPlayer
local char=client.Character
local cam=workspace.CurrentCamera

local torso=char.Torso
local head=char.Head

local w=Instance.new('Weld',head)
w.Part0=torso
w.Part1=head
w.C1=head.CFrame:toObjectSpace(torso.CFrame)

local runserv=game:service'RunService'
local m=client:GetMouse()
m.TargetFilter=char

local right=char:WaitForChild'Right Arm'
local left=char:WaitForChild'Left Arm'

local w1,w2=Instance.new('Weld',right),Instance.new('Weld',left)
w1.Part0=w1.Parent
w2.Part0=w2.Parent
w1.Part1=head
w2.Part1=head

w1.C0=CFrame.new(-1.5,-1.5,0)*CFrame.Angles(math.pi/2,0,0)
w2.C0=CFrame.new(1.5,-1.5,0)*CFrame.Angles(math.pi/2,0,0)
runserv:BindToRenderStep('Arms',Enum.RenderPriority.Camera.Value,function()
w.C1=CFrame.new(head.CFrame.p,m.Hit.p):toObjectSpace(torso.CFrame)
right.LocalTransparencyModifier=0
left.LocalTransparencyModifier=0
end)
Report Abuse
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
15 Oct 2015 09:09 PM
Okay when I said your math was bad, I ment that using CFrame.Angles was, I mean if you know that much about CFrame I would use a diffrent method. I dont know if your current method or your other one was better or not.
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
16 Oct 2015 06:41 AM
help me11111

works but its stuttery af
Report Abuse
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
16 Oct 2015 06:22 PM
well idk what u maen by sdtyudfderyu
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
16 Oct 2015 07:27 PM
it is stuttery
Report Abuse
lostend is not online. lostend
Joined: 21 Aug 2011
Total Posts: 8265
17 Oct 2015 10:34 AM
halp!!!
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