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

How to move player arm with script?

I want to rotate the arm of the player but without using animations. I tried using CFrame but found nothing. I have a script which activates when the player equips a tool, I want that script to rotate the players right arm 90 degrees forward.

1 comment

0

Motor6D

3 answers

Arms (and other body parts) are connected to each other with a Motor6d. You can change the rotation by editing the C0/C1 properties of the Motor6D that connects the arm and the torso

i assume you are using R6

local script:

local player = game.Players.LocalPlayer -- getting the player
local char

repeat wait() char = player.Character until char -- getting the character

wait(5)

-- \\ this part also works in server script. the above parts only in local script
local RShoulderJoint = char.Torso["Right Shoulder"] -- getting the joint 

if RShoulderJoint then
	RShoulderJoint.C0 = RShoulderJoint.C0 * CFrame.Angles(math.rad(90),0,0) -- rotating the C0 by 90 degrees
end
-- //

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