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 rotate a player's torso?

I've been trying to rotate a player's torso. I've tried Torso and HumanoidRootPart. When I use CFrame it says Vector3 expected but when I use Vector3 it either glitches or kills the player.

2 answers

✓ Accepted answer

You can use CFrame.fromAxisAngle in order to create a rotation which can be combined with the current CFrame of the Torso.

local rotation = CFrame.fromAxisAngle(Vector3.new(0, 1, 0), math.rad(45))
Torso.CFrame = Torso.CFrame * rotation

The same can be done with HumanoidRootPart if you are dealing with R15 compatibility.

4 comments

0

How do I make a player face the same direction as a part with that method?

0

If you are trying to make the character face a part, you should instead use CFrame.new(pos, lookAt)

0

Torso.CFrame = CFrame.new(Torso.Position, Part.Position)

0

Thank you

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