Using players arms to make a viewmodel

Its a first person game. Idc if the arms are of the torso I just want them at the sides of the camera.

sorry if this came off agressive

I know, but I don’t think Motor6Ds likes their c0 and c1 disconnected

well then how will I do this then? I just don’t want to make 2 animations for different models.

Try changing the rotation (and only the rotation) part of the CFrame to the rotation part of the CFrame of the camera

could you elaborate (I’m stupid)

also, wouldn’t that just move the whole character?

(hopefully that works)

ok well actually that talks about rotation the camera

just do like

RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(Camera.CFrame.Rotation)

image

Oh wait im stupid

RightShoulder.C0 = RightShoulder.C0 * Camera.CFrame.Rotation

forgot that thats already a CFrame angle

image
I don’t think that will move it to the camera.

also, when I go into first person it just spins.

See if this forum can help.

ok wait lemme see rq
aaaaaaaaaaaaa

oh yeah uh

RightShoulder.C0 = RightShoulder.C0.Position + CFrame.Angles(Camera.CFrame.Rotation)

argument 3 missing or nil has happened

I don’t want to clone the arms, I want to use the arms.

yea no i made the mistake again, remove the “CFrame.Angles”

invalid argument. I’m messing with values to see If I can get it to work

I do wanna say though. I see what you are trying to do but when looking up in first person the tool comes very close to the screen

wait what

no like RightShoulder.C0 = RightShoulder.C0.Position + Camera.CFrame.Rotation

(also whats the specific error?)

that’s what I have

also I already have code that makes the arms face the same direction as the camera. I just need them to line up

I need the arms to be a bit more back

ok what is the code that you’re using rn?

also

RightShoulder.C0 = CFrame.new(RightShoulder.C0.Position) + Camera.CFrame.Rotation```

server side: (so everyone can see there are looking up)

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ArmsEvent = ReplicatedStorage.ArmsEvent

game.Players.PlayerAdded:Connect(function(player)
  player.CharacterAdded:Connect(function(character)
    local RenderService = game:GetService("RunService")
    local ToolMotor = Instance.new("Motor6D")
    ToolMotor.Parent = character:WaitForChild("HumanoidRootPart")
    local mousePosition = Vector3.new(0, 0, 0)

    ArmsEvent.OnServerEvent:Connect(function(plr, position)
      if plr == player then
        mousePosition = position
      end
    end)

	local RightShoulder, LeftShoulder, ToolGrip = character.UpperTorso:WaitForChild("RightShoulder"), character.UpperTorso:WaitForChild("LeftShoulder"), ToolMotor

    RenderService.Heartbeat:Connect(function()
      local X = -(math.asin((character.HumanoidRootPart.Position - mousePosition).unit.y))

      local _, Y, Z = RightShoulder.C0:ToEulerAnglesXYZ()
      local OldRightC0 = RightShoulder.C0
      RightShoulder.C0 = CFrame.new(RightShoulder.C0.Position) * CFrame.Angles(X, Y, Z)
      local Difference = OldRightC0.Position - RightShoulder.C0.Position

      local _, Y, Z = ToolGrip.C0:ToEulerAnglesXYZ()
      ToolGrip.C0 = CFrame.new(ToolGrip.C0.Position) * CFrame.Angles(X, Y, Z)

      local _, Y, Z = LeftShoulder.C0:ToEulerAnglesXYZ()
      LeftShoulder.C0 = CFrame.new(LeftShoulder.C0.Position) * CFrame.Angles(X, Y, Z)
    end)
  end)
end)