Hi, I was trying to make a game where you can point your arm, so I found a script, modified it to work for R6, and then tried to make it move both arms, but it for some reason broke whit no error in the output.
Local script in SCR:
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local plr = Players.LocalPlayer
local char = plr.Character
local mouse = plr:GetMouse()
local armOffset = char.Torso.CFrame:Inverse() * char["Right Arm"].CFrame
local armOffset2 = char.Torso.CFrame:Inverse() * char["Left Arm"].CFrame
local armWeld = Instance.new("Weld")
armWeld.Part0 = char.Torso
armWeld.Part1 = char["Right Arm"]
armWeld.Parent = char
local armWeld2 = Instance.new("Weld")
armWeld.Part0 = char.Torso
armWeld.Part1 = char["Left Arm"]
armWeld.Parent = char
RunService.Heartbeat:Connect(function()
local cframe = CFrame.new(char.Torso.Position, mouse.Hit.Position) * CFrame.Angles(math.pi/2, 0, 0)
armWeld.C0 = armOffset * char.Torso.CFrame:toObjectSpace(cframe)
local cframe2 = CFrame.new(char.Torso.Position, mouse.Hit.Position) * CFrame.Angles(math.pi/2, 0, 0)
armWeld2.C0 = armOffset2 * char.Torso.CFrame:toObjectSpace(cframe2)
end)