How would i get the direction the mouse is pointing at?

so I know the mouse.hit.position can work, but since there is a part in front of the mouse in my game, the rotation of the mouse wouldn’t accurate since the box can be moving, how do i get only the direction the mouse is facing?

Use Mouse.Hit.LookVector it tells the direction the mouse is pointing at :wink:

hmm, it became more inaccurate for some reason, it went sideways


it went like that way.

You can use Camera:ScreenPointToRay() to get a ray from the position of the mouse.