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

How to make an object point to mouse.hit.p?

Asked by
Voltoxus 248 Moderation Voter
10 years ago

I'm making an FPS and a gun is welded to the players head, I would I go about aiming the gun to the mouse.hit.p ? I've already tried C0 = CFrame.new(pos1,pos2) and it doesn't work It just moves the head off the body along with the arms in some random direction. Pos1 is head position and I welded the gun to the head and pos2 is the mouse.hit.p The heads suppose to move as the gun would of up and down only.

Any help is helpful ;D

Answer this question