Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 10 years ago

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.

0
Do you only want the torso to rotate around the y-axis? duckwit 1404 — 10y
0
Yes. aleksa12432 15 — 10y

3 answers

Log in to vote
0
Answered by 10 years ago

Use a BodyGyro

Try using a while loop or the mouse's move and Idle functions.

Ad
Log in to vote
0
Answered by
Diitto 230 Moderation Voter
10 years ago

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);
0
Nope, didn't work. aleksa12432 15 — 10y
Log in to vote
0
Answered by 10 years ago

Well, I did it, using bodygyro.

Answer this question