I've made this code and it points to mouse it just is inside of the body for some reason?
repeat wait() until game.Players.LocalPlayer.Character
local body = game.Players.LocalPlayer.Character
local left_arm = body["Left Arm"]
local right_arm = body["Right Arm"]
local mouse = game.Players.LocalPlayer:GetMouse()
--
leftDown = false
rightDown = false
mouse.Button1Down:Connect(function()
leftDown = true
end)
mouse.Button1Up:Connect(function()
leftDown = false
end)
mouse.Button2Down:Connect(function()
rightDown = true
end)
mouse.Button2Up:Connect(function()
rightDown = false
end)
--
local leftArmWeld = Instance.new("Weld")
leftArmWeld.Parent = body
leftArmWeld.Part0 = body.Torso
leftArmWeld.Part1 = left_arm
leftArmWeld.Name = "LeftArmWeld"
local rightArmWeld = Instance.new("Weld")
rightArmWeld.Parent = body
rightArmWeld.Part0 = body.Torso
rightArmWeld.Part1 = right_arm
leftArmWeld.Name = "RightArmWeld"
local armoffset_left = body.Torso.CFrame:Inverse() * body["Left Arm"].CFrame
local armoffset_right = body.Torso.CFrame:Inverse() * body["Right Arm"].CFrame
mouse.Move:Connect(function()
local x,y,z = CFrame.new(body["Left Arm"].Position,mouse.Hit.Position):ToEulerAnglesXYZ()
local x1,y1,z1 = CFrame.new(body["Right Arm"].Position,mouse.Hit.Position):ToEulerAnglesXYZ()
if leftDown then
leftArmWeld.C0 = armoffset_left * CFrame.fromEulerAnglesXYZ(x,y,z) * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
else
leftArmWeld.C0 = armoffset_left
end
end)

1 comment
It may also be an issue with where the location you put it in. Did you watch a tutorial?