Trying to make R15 arms move w gun

i know there’s several topics on this but i want to know how you could go about it. obviously theres more to it than what i have but i just want some ideas really. i appreciate any help!


function mainModule.Armsfunction()
	local plr = game.Players.LocalPlayer
	local char = plr.Character
	local mouse = plr:GetMouse()
	local rs = game:GetService("RunService")
	local cam = workspace.CurrentCamera
	local connection = nil
	local bodypartstorage = nil
	local rua = char.RightUpperArm

	local bodyParts = {
		LeftSide = {		

		RightSide = {	

	connection = rs.RenderStepped:Connect(function()
		for i, bodyPart:MeshPart in ipairs(char:GetChildren()) do
			if table.find(bodyParts.LeftSide, bodyPart.Name) then

				for _, m6d:Motor6D in pairs(bodyPart:GetChildren()) do
					if m6d:IsA("Motor6D") then
						m6d.C0 =, 0, 0)

this is what i got so far. unfortunately my limbs are like seperate: