How to fix aimbot gun?

  1. What do you want to achieve? Keep it simple and clear!
    So in this video :


    ,the players camera goes to the enemy, but as you can see, the bullets dont hit the enemy, because it goes to the mouse, but the mouse is at the enemy, so i want to fix it. btw this is not for aimbotting on games, its for me and my friends to play my game.

  2. What is the issue? Include screenshots / videos if possible!
    The guns bullets dont go to the mouse even when the mouse is looking straight at the enemy.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried YT and Devforum.

you can raycast from the camera position and camera lookvector, then you get the hit position and move the bullet to it

this cN help you: