local Players = game:GetService("Players") local player = Players.LocalPlayer local motor = player.Character.Torso:WaitForChild("Left Shoulder") motor.C0 = motor.C0*CFrame.Angles(0,0,80) wait(1) motor.C0 = motor.C0*CFrame.Angles(0,0,-80) print("moved")
the script just moves the arm up then down but how do I make the arm not move (The Left arm is playing the roblox walk animation) around when walking?
Here's what's wrong:
local Players = game:GetService("Players") -- Get players service local player = Players.LocalPlayer -- Get the current person that own the local script local motor = player.Character.Torso:WaitForChild("Left Shoulder") -- Get the Left Shoulder Motor6D motor.C0 = motor.C0*CFrame.Angles(0,0,80) -- Changes Motor6D angle to 80
Remove the part of the script below so it'll keep the angle at 80.
wait(1) -- After a second, it'll change motor6d angle to -80 motor.C0 = motor.C0*CFrame.Angles(0,0,-80) print("moved")
local char = player.Character or player.CharacterAdded:wait() local torso = player.Character.Torso local arms = {char:findFirstChild("Right Arm"), char:findFirstChild("Left Arm")} local armWelds = {} --welds arms to torso so that standard humanoid anims doesn't apply to them local function weldArms() if torso and arms[1] and arms[2] then local weld = Instance.new("Weld") weld.Name = "RightArm" weld.Parent = torso weld.Part0 = torso weld.Part1 = arms[1] weld.C1 = CFrame.new(-1.5, 0, 0) * CFrame.Angles(0, 0, 0) armWelds[1] = weld -- Welds Right Arm local weld2 = Instance.new("Weld") weld2.Name = "LeftArm" weld2.Parent = torso weld2.Part0 = torso weld2.Part1 = arms[2] weld2.C1 = CFrame.new(1.5, 0, 0) * CFrame.Angles(0, 0, 0) armWelds[2] = weld2 -- Welds Left Arm --Puts both arms to the side of the player and won't let them move end end --unwelds arms so that standard humanoid anims apply to them local function unweldArms() if arms and armWelds then armWelds[1]:Destroy() -- Unwelds Right plays anims armWelds[2]:Destroy() -- Unwelds Left plays anims end end
Found out that welding arms to the torso will make them stiff allowing you to manipulate motor6D, I found this while looking through old scripts which used motor6D animations.
Just connect these functions to an event and there you have stiff arms! :)