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

How do I make animations on Tool equipped?

Hi, guys! I want to make a Tool so that whenever a player equips it, the player's Left Arm and Right Arm changes angles and position. (Kind of like playing an animation) Anyways, I figured out how to change the angles of both like so: (The following is only the small animation portion of an entire script. Don't worry about the Player not being stated and stuff!)

tool.Equipped:connect(function(mouse)
	local RightShoulder = Player.Character.Torso["Right Shoulder"]
	local LeftShoulder = Player.Character.Torso["Left Shoulder"]
 	RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,0.6,0)
 	LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,-0.5,0)
end)
tool.Unequipped:connect(function(mouse)
	reload:Play()
	local RightShoulder = Player.Character.Torso["Right Shoulder"]
	local LeftShoulder = Player.Character.Torso["Left Shoulder"]
 	RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(0,-0.6,0)
 	LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(0,0.5,0)
end)

The script above works fine, and I think I got the concept of how to change the Arms' angles. What I DON'T know is how to change their position. If anyone could help me solve this problem, I would highly appreciate it! --Thanks in advance!

1 answer

✓ Accepted answer

To change there position, just change the cframe.

rightshoulder.C0 = CFrame.new(1.4, 0, 0)*CFrame.Angles(0,-.6,0)

Just test the offset, till you get the one you wont :)

If this helped like this answer :)

2 comments

0

Thanks. But how do I get the CFrame off when the tool is unequipped? What are the numbers?

1

I think CFrame.new(-1.4,0,0) for left then the oppisite for right. If you could like this answer if it helped that would be great :)

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