Example: http://www.roblox.com/BATTLEFIELD-place?id=114127058
I want to make the arms point relative to where the CurrentCamera is looking. The reason why I want to calculate off of the Camera instead of the Mouse is because I plan for the mouse to be in the middle of the screen (First Person) when pulling this off. Now, I know this sort of requires two sets of arms, one for the screen (fake arms in the CurrentCamera), the other for the character (the real arms, so that the other players can see where the player is aiming). I already know how to set the fake arms in the CurrentCamera, but unfortunately, I don't know how to position the real arms. I would like to use the SetDesiredAngle method in the Motor6Ds to move the arms up and down, but I do not know the math to set the angle to point to the Camera, any help?
For best effect, you weld the fake arms onto the real arms and make the fake arms non-transparent when the focus and the coordinate's delta magnitude is less than 1.
You then weld the real arms onto the head and make a new weld that replace the Neck Motor6D.
You move the head towards the camera something like
Weld.C0 = Weld.Part1.CFrame:inverse()* CFrame.new(C0Numbers,C0Numbers+UnitVector) *CFrame.Angles(rotation) *CFrame.Angles(Offsetrotation)
for FPS I prefer to use R6 real arms this is my local script:
plr = game.Players.LocalPlayer; repeat wait() until plr.Character char = plr.Character m = plr:GetMouse() game["Run Service"].RenderStepped:connect(function() local c = game.Workspace.CurrentCamera char.HumanoidRootPart["RootJoint"].C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.asin((m.Origin.p - m.Hit.p).unit.y) + 1.55,3.15,0) char.Humanoid.CameraOffset = (char.HumanoidRootPart.CFrame+Vector3.new(0,0,0)):pointToObjectSpace(char.Head.CFrame.p + Vector3.new(0,-1.46,0)) end)