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

How do I make a character's UpperTorso face Mouse.Hit?

Asked by 5 years ago

I want to make a character's upper body face Mouse.Hit or the Camera's lookVector, like in many other games.

How do I do this? Will it cause problems when used with normal Roblox animations (like walking)?

1 answer

Log in to vote
0
Answered by 5 years ago

This will depend on what character it is. For R15 you have to look at the Motor6D that is connecting the lower torso to upper. Then you have to set it's C0 to

CFrame.new(0,1,0) * CFrame.Angles(0,math.rad(num),0)

to get num you have to get the position of the mouse and get the orientation that is needed for the player to face that position. And you having Roblox animations will only make it so that they are added to the players Motor6D. In other words, they will play normally, and in the direction your body parts are facing. Hope this helps!

0
Thanks, that helps. Not sure yet how to get the correct but I'll probably figure it out. GuestOfChaos 2 — 5y
Ad

Answer this question