Based on what adark said, I created a short, little demonstrative LocalScript (not FilteringEnabled compatible).
while not game.Players.LocalPlayer.Character do
wait(0.1)
end
wait()
local arm = game.Players.LocalPlayer.Character["Right Arm"]
local shoulder = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]
local C0 = CFrame.new(arm.Position - shoulder.Parent.Position)
local weld = Instance.new("Weld", shoulder.Parent)
weld.Part0 = weld.Parent
weld.Part1 = arm
weld.C0 = C0
shoulder:Destroy()
while wait(0) do
local direction = (CFrame.new(C0.p, game.Players.LocalPlayer:GetMouse().Hit.p) * CFrame.Angles(math.rad(90), 0, 0) + Vector3.new(0, 0.6, 0))
weld.C0 = direction
end
This gets the general idea going. I had to create my own Motor6D -> weld system, since I didn't really know what kind of an environment you're working in. It should also be noted that my script quality and efficiency is not what it normally is, I threw this together in a hurry to be an example, not fully functional script. You can try it for yourself; put the script in StarterGui or StarterPack and watch what happens.