Hello, I have a gun script that works fine. However, I don’t like the idea of the bullet tracers going through the players character to hit its target. I made a simple solution to this problem though; I will make the character face its mouse.Hit position(aimpos). I personally am very bad at trig so I decided to use this script:
RootHI.C0 = CFrame.lookAt(hrp.Position, aimpos)
When I used this script, it was acting funky and teleported my character through the ground and back for some reason.
I have also tried:
hrp.CFrame = CFrame.LookAt(hrp.Position, aimpos)
This worked perfectly but when I used it, it didn’t allow my character to move when shooting because it constantly set my characters hrp position.
DO KEEP IN MIND that I have tried to use CFrame.LookAt() for the HumanoidRootPart to the aimpos but it didn’t allow my character to move when I used this. Therefor I am using Motor6Ds.
Brilliant! I had to edit this code a little of course since it’s inside a server script but it worked nice and my character turned smooth exactly as I wanted. Since I have no expierience with Gyros I would have never thought of this. Nice Job.