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

[SOLVED] How could I point the torso to the mouse?

I'm using this currently:

rjcf = rootc0 * CFrame.Angles(0,mouse.Hit.lookVector.x,0)

rjcf is "RootJoint CFrame" (the C0 of the torso) rootc0 is "RootJoint C0" (the default C0 rotation of the torso) This works, except if I turn around 180 degrees, then it's still looking the other side.

I solved this alone, using bodygyro.

2 comments

0

Do you only want the torso to rotate around the y-axis?

0

Yes.

3 answers

I can't test this right now(very busy), but try:


rjcf = rootc0 * CFrame.Angles(0,mouse.Hit.lookVector.x,0) * CFrame.Angles(0,-math.pi,0);

1 comment

0

Nope, didn't work.

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