Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make the arm stay stiff with motor6d?

	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?

6 comments

0

Did you even script this? The script does exacly what it's said to do, it sets Motor6D to 80 and then -80 with angles. I would recommend you learn instead of getting code from other people, since not even you know what it does.

0

what are you on about? he's clearly just asking how he can make the arm stay stiff, the animations are probably fighting his code

0

Dude, if he didn't make the script he won't know what he's doing, which is a problem.

0

Anyway, i'm posting how to make the arm stand still.

0

I did make this very basic script I just wanted the arm to be stiff like the right arm when holding a tool instead the left arm plays the Roblox walking animation

0

wasd

2 answers

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")

1 comment

0

Perhaps I didn't say describe my problem correctly, The script works fine it does what I want ( move the left arm up then back down) the problem is that when I walk the arm moves doing the normal roblox walk animation. I'm trying to get the left arm to be stiff like the right arm when holding a tool.

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! :)

This discussion is preserved as it was. New answers, comments, and votes are closed.